sonic-pi
sonic-pi copied to clipboard
[Server] Show filepath in errors
Description
Includes the file path in error messages when an error occurs in an external file (via run_file), and Should hopefully fix #2336 Fixes a server crashing bug in the original PR (#2470)
Testing checklist
- [x] Sonic Pi boots without errors
- [x] run_file: Error message shows the external file's path
- [ ] code in buffer: Error message shows the buffer no.
Screenshots (if appropriate):
Types of changes
Bug fix (non-breaking change which fixes an issue)
My tests of the PR on my Debian 10 desktop yield this result:
@samaaron what do you think? :)
Also, does the info[:type] value need to be frozen aswell to avoid other issues?
https://github.com/sonic-pi-net/sonic-pi/blob/1b5d922023357cdcc5e029793855f1e4315824bb/app/server/ruby/lib/sonicpi/runtime.rb#L790-L792