From 14e282948996f75e87a14ab90f4b3ed54d9d6ad7 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 26 Oct 2014 12:42:53 +0000 Subject: remove the die API from the core. The die() API for abnormal termination does not belong within the core of netsurf and instead errors are propogated back to the callers. This is the final part of this change and the API is now only used within some parts of the frontends --- cocoa/NetsurfApp.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'cocoa/NetsurfApp.m') diff --git a/cocoa/NetsurfApp.m b/cocoa/NetsurfApp.m index 3bd5f43f8..d76aee10c 100644 --- a/cocoa/NetsurfApp.m +++ b/cocoa/NetsurfApp.m @@ -49,6 +49,18 @@ static bool cocoa_done = false; +/** + * Cause an abnormal program termination. + * + * \note This never returns and is intended to terminate without any cleanup. + * + * \param error The message to display to the user. + */ +static void die(const char * const error) +{ + [NSException raise: @"NetsurfDie" format: @"Error: %s", error]; +} + - (void) loadOptions; { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; -- cgit v1.2.3