summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile1
-rw-r--r--MLKThrowException.h20
-rw-r--r--MLKThrowException.m25
3 files changed, 46 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 4655041..b2de3a9 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -20,6 +20,7 @@ include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = etoilisp
etoilisp_OBJC_FILES = MLKCons.m MLKDynamicContext.m MLKEnvironment.m \
MLKLinkedList.m MLKLispValue.m MLKSymbol.m \
+ MLKThrowException.m \
MLKUndefinedVariableException.m
BUNDLE_NAME = Test
diff --git a/MLKThrowException.h b/MLKThrowException.h
new file mode 100644
index 0000000..567cbcc
--- /dev/null
+++ b/MLKThrowException.h
@@ -0,0 +1,20 @@
+/* -*- mode: objc; coding: utf-8 -*- */
+/* Copyright 2008, Matthias Benkard. */
+
+#include <Foundation/NSException.h>
+
+@class MLKSymbol;
+
+
+@interface MLKThrowException : NSException
+{
+ MLKSymbol *_catchTag;
+ id _value;
+}
+
+-(MLKThrowException *) initWithCatchTag:(MLKSymbol *)catchTag
+ value:(id)value;
+
+-(MLKSymbol *) catchTag;
+-(id) value;
+@end
diff --git a/MLKThrowException.m b/MLKThrowException.m
new file mode 100644
index 0000000..799db7e
--- /dev/null
+++ b/MLKThrowException.m
@@ -0,0 +1,25 @@
+/* -*- mode: objc; coding: utf-8 -*- */
+/* Copyright 2008, Matthias Benkard. */
+
+#include "MLKThrowException.h"
+
+
+@implementation MLKThrowException
+-(MLKThrowException *) initWithCatchTag:(MLKSymbol *)catchTag
+ value:(id)value
+{
+ _catchTag = catchTag;
+ _value = value;
+ return self;
+}
+
+-(MLKSymbol *) catchTag
+{
+ return _catchTag;
+}
+
+-(id) value
+{
+ return _value;
+}
+@end