Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScriptingContainer.runScriptlet(PathType.CLASSPATH, filename) should throw a FileNotFoundException #1160

Closed
elcubo opened this issue Oct 24, 2013 · 2 comments

Comments

@elcubo
Copy link
Contributor

elcubo commented Oct 24, 2013

Example:

scriptingContainer.runScriptlet(PathType.CLASSPATH, "missing_file.rb");

This runs and returns null even if the file doesn't exist.

@kares kares added the embed label Mar 20, 2015
@kares
Copy link
Member

kares commented Mar 20, 2015

that is just an optional parameter that servers as a hint with back-traces (more like a __FILE__ - you can not assume it's always pointing to an existing file) doing a check would likely surprise break a lot of users

@kares kares closed this as completed Mar 20, 2015
@enebo enebo added this to the Invalid or Duplicate milestone Apr 28, 2015
@abonas
Copy link

abonas commented Jun 15, 2015

@kares I ran into this as well, and the other PathType options do alert the user that the file is not found, while the CLASSPATH type just doesn't return any indication to user and it looks like the script ran with "null" which is misleading. So I would ask to consider reopening this issue, I think it's confusing and also not consistent behavior across different PathType options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants