summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-06-23 20:30:30 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-06-23 20:30:30 +0200
commitafd6c569190878a336f686d70d8bcc567f40809f (patch)
treec07c9548972d49531a9b2b0da20fbc229b22e9b3
parent85eb92df39b3825183d9a737aed0fdb3872c9241 (diff)
Reader: Raise an exception when encountering a package marker that does not designate an existing package.
-rw-r--r--MLKReader.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/MLKReader.m b/MLKReader.m
index 8784f30..68db172 100644
--- a/MLKReader.m
+++ b/MLKReader.m
@@ -449,6 +449,12 @@
{
package = [MLKPackage
findPackage:[token substringToIndex:packageMarker]];
+
+ if (!package)
+ [NSException raise:@"MLKReaderError"
+ format:@"Can't find package %@.",
+ [token substringToIndex:packageMarker]];
+
if ([readtable isPackageMarker:[token characterAtIndex:(i+1)]])
symbolName = [token substringFromIndex:(packageMarker+2)];
else