* Source/GSGhostscriptImageRep.m: Change to NSLog, only log

a warning the first time invoking ghostscript throws an exception,
and log a message if it returns a nonzero exit status.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33527 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2011-07-11 18:16:45 +00:00
parent f13998e491
commit 31f3fffb8f
2 changed files with 18 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2011-07-11 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSGhostscriptImageRep.m: Change to NSLog, only log
a warning the first time invoking ghostscript throws an exception,
and log a message if it returns a nonzero exit status.
2011-07-11 Eric Wasylishen <ericw@new-host-2.home>
* Source/GSGhostscriptImageRep.m: Add NSWarnLog to execption

View file

@ -134,7 +134,7 @@
if (!warned)
{
warned = YES;
NSWarnLog(@"An error occurred while determining the Ghostscript executable path. If you would like to use Ghostscript you can set the GSGhostscriptExecutablePath user default to the full path to the gs executable.");
NSLog(@"An error occurred while determining the Ghostscript executable path. If you would like to use Ghostscript you can set the GSGhostscriptExecutablePath user default to the full path to the gs executable.");
}
}
NS_ENDHANDLER
@ -176,10 +176,20 @@
result = [outputHandle readDataToEndOfFile];
[outputHandle closeFile];
if (![task isRunning] && [task terminationStatus] != 0)
{
NSLog(@"Ghostscript returned exit status %d", [task terminationStatus]);
}
}
NS_HANDLER
{
NSWarnLog(@"An error occurred while attempting to invoke Ghostscript at the following path: %@", launchPath);
static BOOL warned = NO;
if (!warned)
{
warned = YES;
NSLog(@"An error occurred while attempting to invoke Ghostscript at the following path: %@", launchPath);
}
}
NS_ENDHANDLER