sonic-pi icon indicating copy to clipboard operation
sonic-pi copied to clipboard

[Server] Show filepath in errors

Open SunderB opened this issue 5 years ago • 2 comments

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)

SunderB avatar Oct 06 '20 18:10 SunderB

My tests of the PR on my Debian 10 desktop yield this result: Sonic Pi filename in errors demo 1-lowquality576p

SunderB avatar Oct 22 '20 21:10 SunderB

@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

SunderB avatar Oct 22 '20 21:10 SunderB