mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-03 10:10:49 +00:00
* 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:
parent
6a88e333d4
commit
bb225f9ead
2 changed files with 18 additions and 2 deletions
|
@ -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>
|
2011-07-11 Eric Wasylishen <ericw@new-host-2.home>
|
||||||
|
|
||||||
* Source/GSGhostscriptImageRep.m: Add NSWarnLog to execption
|
* Source/GSGhostscriptImageRep.m: Add NSWarnLog to execption
|
||||||
|
|
|
@ -134,7 +134,7 @@
|
||||||
if (!warned)
|
if (!warned)
|
||||||
{
|
{
|
||||||
warned = YES;
|
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
|
NS_ENDHANDLER
|
||||||
|
@ -176,10 +176,20 @@
|
||||||
|
|
||||||
result = [outputHandle readDataToEndOfFile];
|
result = [outputHandle readDataToEndOfFile];
|
||||||
[outputHandle closeFile];
|
[outputHandle closeFile];
|
||||||
|
|
||||||
|
if (![task isRunning] && [task terminationStatus] != 0)
|
||||||
|
{
|
||||||
|
NSLog(@"Ghostscript returned exit status %d", [task terminationStatus]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
NS_HANDLER
|
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
|
NS_ENDHANDLER
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue