mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
DirectObjectFinder: Throwing exception print the token name that we got
This commit is contained in:
@@ -76,7 +76,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new PdfDocumentFormatException($"Could not find the object number {reference} with type {typeof(T).Name}.");
|
throw new PdfDocumentFormatException($"Could not find the object number {reference} with type {typeof(T).Name} instead, it was found with type {temp.GetType().Name}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static T Get<T>(IToken token, IPdfTokenScanner scanner) where T : class, IToken
|
public static T Get<T>(IToken token, IPdfTokenScanner scanner) where T : class, IToken
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
return Get<T>(reference.Data, scanner);
|
return Get<T>(reference.Data, scanner);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new PdfDocumentFormatException($"Could not find the object {token} with type {typeof(T).Name}.");
|
throw new PdfDocumentFormatException($"Could not find the object {token} with type {typeof(T).Name} instead, it was found with type {token.GetType().Name}.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user