From fa80a22946b0febc31b23a50cbd6922e39cfcb93 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 13 Dec 2007 19:26:47 +0000 Subject: [PATCH] Monotone-Parent: ab33bf455396ef05789524fb34a58f5abdc8ca98 Monotone-Revision: 184ea8d5f44aa0290cfcfc13737469283f4e77ea Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-12-13T19:26:47 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ UI/MainUI/SOGoRootPage.m | 31 +++++++++++++++++++++++++++++++ UI/MainUI/product.plist | 15 +++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/ChangeLog b/ChangeLog index 78fd532f7..debdfec73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-12-13 Wolfgang Sourdeau + * UI/MainUI/SOGoRootPage.m ([SOGoRootPage -crashAction]): new + action methods that generates a segmentation faults. + ([SOGoRootPage -exceptionAction]): new method that returns an + exception object. + ([SOGoRootPage -raisedExceptionAction]): new method that raises an + exception without returning it. + * UI/SOGoUI/UIxComponent.m ([UIxComponent -responseWithStatus:status]) ([UIxComponent -responseWithStatus:statusandString:contentString]) ([UIxComponent -responseWithStatus:statusandJSONRepresentation:contentObject]) diff --git a/UI/MainUI/SOGoRootPage.m b/UI/MainUI/SOGoRootPage.m index bb696b81a..cf295538b 100644 --- a/UI/MainUI/SOGoRootPage.m +++ b/UI/MainUI/SOGoRootPage.m @@ -19,6 +19,8 @@ 02111-1307, USA. */ +#import + #import #import #import @@ -35,6 +37,12 @@ #import "SOGoRootPage.h" +@interface SOGoRootPage (crashAdditions) + +- (void) segfault; + +@end + @implementation SOGoRootPage - (void) dealloc @@ -110,4 +118,27 @@ return YES; } +- (id ) crashAction +{ + [self segfault]; + + return nil; +} + +- (id ) exceptionAction +{ + return (id ) + [NSException exceptionWithName: @"ExceptionAction" + reason: @"This exception is brought to you by SOGo" + userInfo: nil]; +} + +- (id ) raisedExceptionAction +{ + [NSException raise: @"ExceptionAction" + format: @"This exception is brought to you by SOGo"]; + + return nil; +} + @end /* SOGoRootPage */ diff --git a/UI/MainUI/product.plist b/UI/MainUI/product.plist index 63e2c5f8e..83342e464 100644 --- a/UI/MainUI/product.plist +++ b/UI/MainUI/product.plist @@ -89,6 +89,21 @@ protectedBy = ""; pageName = "SOGoRootPage"; }; + crash = { + protectedBy = ""; + pageName = "SOGoRootPage"; + actionName = "crash"; + }; + exception = { + protectedBy = ""; + pageName = "SOGoRootPage"; + actionName = "exception"; + }; + raisedException = { + protectedBy = ""; + pageName = "SOGoRootPage"; + actionName = "raisedException"; + }; connect = { protectedBy = ""; pageName = "SOGoRootPage";