-
Notifications
You must be signed in to change notification settings - Fork 238
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
More specific error message in case of file resolution fails related to //css_import #82
Comments
Further VSCode integration and defect fixes * CLI help improvements - Runtime optimization - Fixed problem with CLI being hosted under Mono+Node.js (Console.WindowWidth is always 0) * Throw informative exception on "in-memory" assembly being subject of "AlighnToInterface" use-case. * Issue #82: More specific error message in case of file resolution fails related to //css_import * Issue #81: CodeDom and interfaces * Added CLI help content separators to assist with parsing when hosted by IDEs. * Fixed typo in CLI output for `-proj` ('searcDir:' -> 'searchDir:') * Started phasing out of `CSScript.Load` in favor of `CSScript.LoadFile` Fixed typo in CLI output for -proj ('searcDir:' -> 'searchDir:') Started phasing out of CSScript.Load in favor of CSScript.LoadFile
Upgraded to 3.27.2 and forced the exception. Three things: Suggesting to change "Exception" on line 867 of fileparser.cs to "FileNotFoundException" to get a more specific exception type. Alternatively, retrieve the effective type of 'e' and call that constructor via reflection, or, additionally catch the more specific FileNotFoundException an then create a wrapping instance of that specific type. Very nice that the whole calling chain is output. However, the stated "from" script is not the respective parent script but rather the top level script. That seems rather confusing. Here's a concrete example:
The last three message lines are OK, but the last forth last is confusing since Finally, a minor inconsistency: |
… resolution fails related to //css_import
All valid points. |
… resolution fails related to //css_import
* Removed '-nl' (no logo) option. Printing logo is suppressed now by default for all CLI scenarios except help, version and 'no args'. * Added typical Linux CLI double-dash prefix for help and version. * Added support for `scripted args` ("cscs -update" where "-update" is a script file). * Enabled setting CS-Script runtime environment variables on Linux. * Reviewed and refined concurrency support on Linux: - mutex cleanup and prompt release - ensuring assembly file is opened for reading during `inmem` loading * Further improvements for issue #82.
Perfect! Users should now be able to much easier locate an issue in a larger script library like the one I've been working on the last couple of weeks. Thanks! |
Currently, if file resolution fails,
CSScriptLibrary.CSScript.Compile...()
throws aSystem.IO.FileNotFoundException
(stack trace see below) stating:Would it be possible to add more details, like stating the file where the
//css_import
cannot be resolved? That would help very much when implementing a highly hierarchical script code, e.g. a script library.Stack trace:
The text was updated successfully, but these errors were encountered: