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