[supercollider/supercollider] d418a4: Fix SC try / catch behaviour for primitive excepti...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[supercollider/supercollider] d418a4: Fix SC try / catch behaviour for primitive excepti...

noreply
  Branch: refs/heads/master
  Home:   https://github.com/supercollider/supercollider
  Commit: d418a48c2be015d4b5d65390441d68049dbc7790
      https://github.com/supercollider/supercollider/commit/d418a48c2be015d4b5d65390441d68049dbc7790
  Author: Scott Wilson <[hidden email]>
  Date:   2017-05-13 (Sat, 13 May 2017)

  Changed paths:
    M lang/LangPrimSource/PyrPrimitive.cpp

  Log Message:
  -----------
  Fix SC try / catch behaviour for primitive exception errors

- the previous version posted exception errors in doPrimitive, rather than setting them in the Error via prPrimitiveErrorString as for other primitive errors. This prevented sclang try / catch from truly catching the error.
- This could be annoying in cases like network music situations, where a stream of errors resulting from another host going down could not be handled as desired even though the problem had nothing to do with SC, or even the local machine.
- this version fixes that, and makes the error message clearer and more informative

Signed-off-by: Scott Wilson <[hidden email]>


  Commit: a899571599fc20e8131ae62bb72f6af25106d7ae
      https://github.com/supercollider/supercollider/commit/a899571599fc20e8131ae62bb72f6af25106d7ae
  Author: Scott Wilson <[hidden email]>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M lang/LangPrimSource/PyrPrimitive.cpp
    M lang/LangSource/VMGlobals.h

  Log Message:
  -----------
  Make primitive exception handling per-PyrThread

- We cannot store exception info directly in the PyrThread, as PyrThreads are never constructed in the normal C++ sense (made in the GC pool), so we store it instead in a map in the VMGlobals instance, using the thread as a key.
- this makes it both per-thread, and supports any future implementations using multiple VMs.


  Commit: 0a90dcab783cd43cb8e2bf5e970865d2560a1734
      https://github.com/supercollider/supercollider/commit/0a90dcab783cd43cb8e2bf5e970865d2560a1734
  Author: Scott Wilson <[hidden email]>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M lang/LangPrimSource/PyrPrimitive.cpp

  Log Message:
  -----------
  Use std::string for primitive error string

Signed-off-by: Scott Wilson <[hidden email]>


  Commit: c8910f0f4f6ca8070f7f8068c485b8f0299c29e5
      https://github.com/supercollider/supercollider/commit/c8910f0f4f6ca8070f7f8068c485b8f0299c29e5
  Author: Scott Wilson <[hidden email]>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M lang/LangPrimSource/PyrPrimitive.cpp

  Log Message:
  -----------
  Fix for catch-all exception handling

Signed-off-by: Scott Wilson <[hidden email]>


  Commit: ba1abe4bc59cf840caf925badc6937ce42e50f19
      https://github.com/supercollider/supercollider/commit/ba1abe4bc59cf840caf925badc6937ce42e50f19
  Author: Brian Heim <[hidden email]>
  Date:   2017-05-18 (Thu, 18 May 2017)

  Changed paths:
    M lang/LangPrimSource/PyrPrimitive.cpp
    M lang/LangSource/VMGlobals.h

  Log Message:
  -----------
  Merge pull request #2876 from supercollider/fix-primitive-exception-handling

Fix SC try / catch behaviour for primitive exception errors

Control for catching exceptions in primitives is redirected to conform to the existing pattern; this avoids extra error messages that appear even when the offending code is properly wrapped in a SuperCollider try-catch block.


Compare: https://github.com/supercollider/supercollider/compare/c876843e477c...ba1abe4bc59c