summaryrefslogtreecommitdiff
path: root/MLKReadEvalPrintLoop.m
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-09-02 12:01:30 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-09-02 12:01:30 +0200
commit34682b0b087a9ced1f23a91f67167f71f304a4a8 (patch)
tree70ef9e0a697a3fdfa194ce4819d55ce2b36fc8af /MLKReadEvalPrintLoop.m
parent84597fcf74fc74672fe664456e62ec6be5f2b066 (diff)
Switch from NS_DURING..NS_HANDLER..NS_ENDHANDLER to @try..@catch..@finally.
Diffstat (limited to 'MLKReadEvalPrintLoop.m')
-rw-r--r--MLKReadEvalPrintLoop.m15
1 files changed, 6 insertions, 9 deletions
diff --git a/MLKReadEvalPrintLoop.m b/MLKReadEvalPrintLoop.m
index 0e213b0..e3700ea 100644
--- a/MLKReadEvalPrintLoop.m
+++ b/MLKReadEvalPrintLoop.m
@@ -51,7 +51,7 @@ static char **_argv;
static const char *prompt (EditLine *e) {
- NS_DURING
+ @try
{
MLKPackage *package = [[MLKDynamicContext currentContext]
valueForSymbol:[[MLKPackage
@@ -60,14 +60,13 @@ static const char *prompt (EditLine *e) {
return [[NSString stringWithFormat:@"%@> ", [package name]] UTF8String];
}
- NS_HANDLER
+ @catch (NSException *localException)
{
printf ("Caught an unhandled exception.\nName: %s\nReason: %s\n",
[[localException name] UTF8String],
[[localException reason] UTF8String]);
return "> ";
}
- NS_ENDHANDLER
}
@@ -102,7 +101,7 @@ static const char *prompt (EditLine *e) {
printf ("Loading init.lisp.\n");
#if 1
- NS_DURING
+ @try
{
#endif
input = [NSInputStream inputStreamWithFileAtPath:@"init.lisp"];
@@ -117,13 +116,12 @@ static const char *prompt (EditLine *e) {
[input close];
#if 1
}
- NS_HANDLER
+ @catch (NSException *localException)
{
printf ("Caught an unhandled exception.\nName: %s\nReason: %s\n",
[[localException name] UTF8String],
[[localException reason] UTF8String]);
}
- NS_ENDHANDLER;
#endif
printf ("Done.\n\n");
@@ -159,7 +157,7 @@ static const char *prompt (EditLine *e) {
break;
#if 1
- NS_DURING
+ @try
#else
#ifdef GNUSTEP
GSDebugAllocationActive (YES);
@@ -185,13 +183,12 @@ static const char *prompt (EditLine *e) {
}
}
#if 1
- NS_HANDLER
+ @catch (NSException *localException)
{
printf ("Caught an unhandled exception.\nName: %s\nReason: %s\n",
[[localException name] UTF8String],
[[localException reason] UTF8String]);
}
- NS_ENDHANDLER;
#endif
LRELEASE (pool);