Check-in Number:
|
2840 | |
Date: |
2002-Nov-18 23:12:02 (local)
2002-Nov-18 22:12:02 (UTC) |
User: | ms |
Branch: | |
Comment: |
Use a titrex exception class for more flexible warning and error handling. |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/as/as-gui/as_except.cpp -> 1.1
*** /dev/null Sat Nov 23 01:05:37 2024
--- - Sat Nov 23 01:05:56 2024
***************
*** 0 ****
--- 1,14 ----
+ #include "titrex.h"
+
+ // Report general exception
+ void Genexcept::reportErr(void)
+ {
+ // Basically, print the message and exit
+ using namespace std;
+ cout << szMessage << endl;
+ }
+
+ // Destroy general exception
+ Genexcept::~Genexcept(void)
+ {
+ }
|
|
ossp-pkg/as/as-gui/as_except.h -> 1.1
*** /dev/null Sat Nov 23 01:05:37 2024
--- - Sat Nov 23 01:05:56 2024
***************
*** 0 ****
--- 1,21 ----
+ #ifndef TITRAQEXCEPT_H
+ #define TITRAQEXCEPT_H
+
+ #include <iostream>
+
+
+ // General string-based exceptions
+ // FIXME: Rewrite according to
+ // OSSP error handling policy
+ class Genexcept
+ {
+ private:
+ char *szMessage;
+
+ public:
+ Genexcept(char *szInmess) {szMessage = szInmess;};
+ void reportErr(void);
+ ~Genexcept(void);
+ };
+
+ #endif // TITRAQEXCEPT_H
|
|