summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/BString.h1
-rw-r--r--include/Exceptions.h10
2 files changed, 9 insertions, 2 deletions
diff --git a/include/BString.h b/include/BString.h
index 4540e70..c4703f0 100644
--- a/include/BString.h
+++ b/include/BString.h
@@ -60,6 +60,7 @@ class String : public Base {
bool operator<(const String &) const;
bool operator>(const String &) const;
char operator[](size_t i) const;
+ char & operator[](size_t i);
operator ugly_string() const;
String & toupper();
String & tolower();
diff --git a/include/Exceptions.h b/include/Exceptions.h
index 98f6c52..17fe093 100644
--- a/include/Exceptions.h
+++ b/include/Exceptions.h
@@ -5,6 +5,7 @@
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
+#include <vector>
#include <generic.h>
#if !defined pid_t && !defined _SYS_TYPES_H
@@ -35,10 +36,14 @@ class Base {
static void exit(int);
static void printm(int level, const ugly_string &, ...);
static void printm(int level, const char *, ...);
+ static void exception(const String &);
+ static void pushcontext(const String &);
+ static void popcontext(void);
+ static void flushcontext(void);
+ private:
+ static std::vector<String> context;
};
-class String;
-
class GeneralException : public Base {
public:
GeneralException(String);
@@ -61,6 +66,7 @@ void * xrealloc(void *, size_t);
int xpipe(int *, int = 0) throw (GeneralException);
pid_t xfork() throw (GeneralException);
void xexit(int) throw (GeneralException);
+void xexception(const String &) throw (GeneralException);
class MemoryException : public GeneralException {
public: