00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00022
00023 #include <common/format2.hpp>
00024
00025 namespace cupt {
00026
00027 CUPT_API void __mwrite_line(const char*, const string&);
00028
00029 template < typename... Args >
00030 void fatal2(const char* format, const Args&... args)
00031 {
00032 auto errorString = format2(format, args...);
00033 __mwrite_line("E: ", errorString);
00034 throw Exception(errorString);
00035 }
00036
00037 template < typename... Args >
00038 void fatal2e(const char* format, const Args&... args)
00039 {
00040 auto errorString = format2e(format, args...);
00041 __mwrite_line("E: ", errorString);
00042 throw Exception(errorString);
00043 }
00044
00045 template < typename... Args >
00046 void warn2(const char* format, const Args&... args)
00047 {
00048 __mwrite_line("W: ", format2(format, args...));
00049 }
00050
00051 template < typename... Args >
00052 void warn2e(const char* format, const Args&... args)
00053 {
00054 __mwrite_line("W: ", format2e(format, args...));
00055 }
00056
00057 template < typename... Args >
00058 void debug2(const char* format, const Args&... args)
00059 {
00060 __mwrite_line("D: ", format2(format, args...));
00061 }
00062
00063 template < typename... Args >
00064 void simulate2(const char* format, const Args&... args)
00065 {
00066 __mwrite_line("S: ", format2(format, args...));
00067 }
00068
00069 }
00070
00072