jshell finishes silently if the user tries to source a script with some error


jshell finishes silently if the user tries to source a script with some error



Follow these steps to reproduce:



Create a '.jsh' script with some kind of error(missing import, syntax error etc)



open a jshell


jshell



/open the erroneous script


/open



The /open command will finish silently.


/open



The elements declared in that script won't be in the current namespace.



Is there a way to force jshell to spit out the error and it's location in the script if an erroneous script is loaded? Setting the feedback level to verbose doesn't change anything.


jshell


verbose




1 Answer
1



jshell imports a lot of classes on startup and any subsequent snippet (even if load from file) can use them, SO few of the missing imports can be taken care here.
--no-startup can be used to disable this behavior.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Export result set on Dbeaver to CSV

Opening a url is failing in Swift