24 #include "ObjCryst/ObjCryst/General.h"
27 #include "ObjCryst/ObjCryst/IO.h"
32 bool ObjCrystException::verbose =
true;
34 ObjCrystException::ObjCrystException() : message()
36 if (ObjCrystException::verbose)
38 cout <<
"LibCryst ++ exception thrown!!" << endl;
42 ObjCrystException::ObjCrystException(
const string & _message)
46 if (!ObjCrystException::verbose)
51 static bool inException;
52 cout <<
"LibCryst ++ exception thrown!!" << endl;
53 cout <<
" Message: " + message <<endl;
54 if(
false==inException)
57 string saveFileName=
"ObjCryst";
60 strftime(strDate,
sizeof(strDate),
"%Y-%m-%d_%H-%M-%S",gmtime(&date));
61 saveFileName=saveFileName+strDate+
".xml";
62 cout <<
"Attempting to save ObjCryst++ environment to file:"<<saveFileName<<endl;
68 {cout<<
"Sorry, failed to save ObjCryst++ environment"<<endl;}
73 ObjCrystException::~ObjCrystException(){}
76 void (*fpObjCrystInformUser)(
const string &)=ObjCrystInformUserStdOut;
void ObjCrystInformUserStdOut(const string &str)
Print some information for the user during long processes.
void XMLCrystFileSaveGlobal(const string &filename)
Save all Objcryst++ objects.
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.