Dialplans with syntax error should report errors in the console output
-
Jay Phillips
- State changed from new to open
- Title changed from Dialplans with syntax error report errors in the console output to Dialplans with syntax error should report errors in the console output
-
Jay Phillips
For the record, I took a look into this recently and there is some WEIRD shit going on that's gobbling up that SyntaxError. No resolution yet...
-
Jay Phillips
- Milestone cleared.
- Tag set to dialplan
-
Ben Klang
- Assigned user cleared.
- Milestone set to 0.8.5
- Milestone order changed from 0 to 0
-
Ben Klang
- Tag changed from dialplan to lost exceptions, dialplan
-
Ben Klang
- Assigned user set to Ben Klang
- State changed from open to hold
- Milestone cleared.
After researching the issue, I can at least explain the cause. The default behavior for unhandled exceptions that occur within threads is for the thread to terminate. However, the rest of the application does not. This can mean that exceptions are silently lost.
Some documentation on the issue here:
http://engineroom.mixx.com/2008/07/31/when-rescue-doesnt/
and here (search for "Threads and Exceptions"):
http://ruby-doc.org/docs/ProgrammingRuby/html/tut_threads.html/One workaround would be to enable Thread.abort_on_exception within Adhearsion itself. For my development purposes, this is exactly what I will do. The downside to this approach is that any unhandled exception within Adhearsions internals can cause the entire application to exit. In my testing, I have already identified several places where this was happening (harmlessly) but the exceptions were never visible.
I propose NOT to change this setting in Adhearsion itself until we have had time to run through more tests and ensure that the application does not throw any internal unhandled exceptions. When we are satisfied that Adhearsion is internally stable, we can enable the Thread.abort_on_exception to allow end-users to be able to debug their applications more easily.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.