Skip to content
Snippets Groups Projects
Commit 10b0f4bd authored by Lukas Stadler's avatar Lukas Stadler
Browse files

additional error info and loading from URL directly in Utils.getResourceAsSource

parent cf19e5ff
No related branches found
No related tags found
No related merge requests found
......@@ -95,11 +95,11 @@ public final class Utils {
try {
URL url = ResourceHandlerFactory.getHandler().getResource(clazz, resourceName);
if (url == null) {
throw new IOException();
throw RInternalError.shouldNotReachHere("resource " + resourceName + " not found, context: " + clazz);
}
return RSource.fromFileName(url.getPath());
return RSource.fromURL(url, resourceName);
} catch (IOException ex) {
throw Utils.fail("resource " + resourceName + " not found");
throw RInternalError.shouldNotReachHere("resource " + resourceName + " not found, context: " + clazz);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment