libtime++: Date and time calculation
cxxtime_util_fatal.cc
Go to the documentation of this file.
1 
34 #define TF_CXXTIME_UTIL_FATAL_CC_VERSION \
35  "TF_CXXTIME_UTIL_FATAL_CC V1.0 "
36 
37 #include <libtime++.h>
38 #include <string>
39 
40 extern "C" {
41 /*
42  * Fortran calling convention:
43  */
44 int time_util_fatal__(char *caller, char *text,
45  time_kernel::ftnlen caller_len,
46  time_kernel::ftnlen text_len)
47 {
48  std::string callerstring, textstring;
49  int i;
50  for (i=0; i<caller_len; i++) { callerstring += *(caller++); }
51  for (i=0; i<text_len; i++) { textstring += *(text++); }
52  std::string message="ERROR ("+callerstring+"): "+textstring;
53  throw(libtime::Exception(message.c_str()));
54  return(0);
55 } /* time_util_fatal__ */
56 
57 } // extern "C"
58 
59 /* ----- END OF cxxtime_util_fatal.cc ----- */
int time_util_fatal__(char *caller, char *text, time_kernel::ftnlen caller_len, time_kernel::ftnlen text_len)
long int ftnlen
Definition: libtime.h:67