How to grab a debug on Syntax Error?
Hi I'm loading some old code to migrate to github and I got an syntax error. The support is a bit terrible. You get a pop up but now idea how to do anything with it. Can we access the stack? We should really improve that part. Now I'm using an old Pharo 40 and trying to guess where was the difference in synta (probably #( #3)) is not allowed anymore and republish a new version. Stef
Depends on whether you have a SyntaxErrorNotification or a SemanticError. For SyntaxErrorNotifications, you can wrap in a handler block raising a debugger (and will see at which index in source the error is for). Handling automatically is very kludgey without changes to the way OpalCompiler fetches source, which isn't really easily available to edit and resume from SyntaxErrorNotification handling code outside the scope of a controlling SourceEditor. For SemanticErrors, you're currently SOL, as they have a handling block in the compiler, rather than being raised and, only if unhandled, use a default action which notifies/logs dependent on whether compilation is interactive or not. -- View this message in context: http://forum.world.st/How-to-grab-a-debug-on-Syntax-Error-tp4950809p4950951.... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Stephane Ducasse-3 wrote
You get a pop up but now idea how to do anything with it.
You're supposed to edit the invalid source code in the popup, and save it. Then load will proceed using the corrected code. The title / tooltip for the popup could surely use some better explaining ;) -- View this message in context: http://forum.world.st/How-to-grab-a-debug-on-Syntax-Error-tp4950809p4950953.... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On 12 Jun 2017, at 10:46, Henrik Sperre Johansen <henrik.s.johansen@veloxit.no> wrote:
Stephane Ducasse-3 wrote
You get a pop up but now idea how to do anything with it.
You're supposed to edit the invalid source code in the popup, and save it. Then load will proceed using the corrected code.
Yes, and it even works (just tested it). It was broken for quite a long time⦠(this does not happen often, so issues with it tend to not be worked on with priority)
The title / tooltip for the popup could surely use some better explaining ;)
There is a menu which is very hidden that has the important âdebug calling processâ. The UI needs some improvements to guide the user better, especially as it is just not every month (or even year) that one sees it⦠Marcus
participants (3)
-
Henrik Sperre Johansen -
Marcus Denker -
Stephane Ducasse