Raise an exception if the PPD file cannot be read. Change make based on

request by Riccardo on the mailing list.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34397 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2012-01-03 09:18:51 +00:00
parent 95c5829fa5
commit c1a3a4549b
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2012-01-03 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSPrinter.m (-loadPPDAtPath:...inclusionSet:): Raise an
exception if PPD file cannot be read.
2012-01-01 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSLayoutManager.m (-characterIndexMoving:...): Fix two

View file

@ -910,6 +910,12 @@ static NSMutableDictionary* printerCache;
[inclusionSet addObject: ppdPath];
ppdString = [NSString stringWithContentsOfFile: ppdPath];
if (nil == ppdString)
{
// The file isn't readable
[NSException raise: NSPPDParseException
format: @"PPD file '%@' isn't readable", ppdPath];
}
// Set up the scanner - Appending a newline means that it should be
// able to process the last line correctly