00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if !defined (octave_error_h)
00025 #define octave_error_h 1
00026
00027 #include <cstdarg>
00028 #include <string>
00029
00030 #define panic_impossible() \
00031 panic ("impossible state reached in file `%s' at line %d", \
00032 __FILE__, __LINE__)
00033
00034 extern OCTINTERP_API void reset_error_handler (void);
00035
00036 extern OCTINTERP_API int warning_enabled (const std::string& id);
00037
00038 extern OCTINTERP_API void vmessage (const char *name, const char *fmt, va_list args);
00039 extern OCTINTERP_API void message (const char *name, const char *fmt, ...);
00040
00041 extern OCTINTERP_API void vusage (const char *fmt, va_list args);
00042 extern OCTINTERP_API void usage (const char *fmt, ...);
00043
00044 extern OCTINTERP_API void vwarning (const char *fmt, va_list args);
00045 extern OCTINTERP_API void warning (const char *fmt, ...);
00046
00047 extern OCTINTERP_API void verror (const char *fmt, va_list args);
00048 extern OCTINTERP_API void error (const char *fmt, ...);
00049
00050 extern OCTINTERP_API void vparse_error (const char *fmt, va_list args);
00051 extern OCTINTERP_API void parse_error (const char *fmt, ...);
00052
00053 extern OCTINTERP_API void
00054 vmessage_with_id (const char *id, const char *name, const char *fmt, va_list args);
00055
00056 extern OCTINTERP_API void
00057 message_with_id (const char *id, const char *name, const char *fmt, ...);
00058
00059 extern OCTINTERP_API void
00060 vusage_with_id (const char *id, const char *fmt, va_list args);
00061
00062 extern OCTINTERP_API void
00063 usage_with_id (const char *id, const char *fmt, ...);
00064
00065 extern OCTINTERP_API void
00066 vwarning_with_id (const char *id, const char *fmt, va_list args);
00067
00068 extern OCTINTERP_API void
00069 warning_with_id (const char *id, const char *fmt, ...);
00070
00071 extern OCTINTERP_API void
00072 verror_with_id (const char *id, const char *fmt, va_list args);
00073
00074 extern OCTINTERP_API void
00075 error_with_id (const char *id, const char *fmt, ...);
00076
00077 extern OCTINTERP_API void
00078 vparse_error_with_id (const char *id, const char *fmt, va_list args);
00079
00080 extern OCTINTERP_API void
00081 parse_error_with_id (const char *id, const char *fmt, ...);
00082
00083 extern OCTINTERP_API void panic (const char *fmt, ...) GCC_ATTR_NORETURN;
00084
00085
00086 extern OCTINTERP_API void defun_usage_message (const std::string& msg);
00087
00088 extern OCTINTERP_API void disable_warning (const std::string& id);
00089 extern OCTINTERP_API void initialize_default_warning_state (void);
00090
00091
00092
00093
00094 extern OCTINTERP_API bool Vdebug_on_error;
00095
00096
00097
00098 extern OCTINTERP_API bool Vdebug_on_warning;
00099
00100
00101 extern OCTINTERP_API int error_state;
00102
00103
00104 extern OCTINTERP_API int warning_state;
00105
00106
00107
00108
00109 extern OCTINTERP_API int buffer_error_messages;
00110
00111
00112 extern OCTINTERP_API bool discard_error_messages;
00113
00114
00115 extern OCTINTERP_API bool discard_warning_messages;
00116
00117
00118 extern OCTINTERP_API std::string last_error_message (void);
00119 extern OCTINTERP_API std::string last_error_id (void);
00120 extern OCTINTERP_API std::string last_warning_message (void);
00121 extern OCTINTERP_API std::string last_warning_id (void);
00122
00123 #endif
00124
00125
00126
00127
00128
00129