00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _FL_EXCEPTION_H_
00023 #define _FL_EXCEPTION_H_
00024
00025 #include "Fl_String.h"
00026 #include "Fl_Export.h"
00027
00032 class FL_API Fl_Exception {
00033 public:
00034 Fl_Exception(const char *text="", const char *file="", int line=0);
00035
00042 Fl_String text(bool short_version=false) const;
00043
00044 protected:
00045 Fl_String m_text;
00046 const char *m_file;
00047 int m_line;
00048 };
00049
00050
00051 #define fl_throw(text) throw Fl_Exception(text, __FILE__, __LINE__)
00052
00053
00054
00055
00056
00057 #define fl_try try
00058 #define fl_catch(exception_variable) catch(Fl_Exception& exception_variable)
00059 #define fl_throw_(text, file, line) throw Fl_Exception(text, file, line);
00060 #define fl_rethrow throw
00061
00062 #endif