MRI: Fix exception message box script name and display script index #64

Merged
Ancurio merged 1 commits from show_exc_fixes into master 2014-09-02 17:48:10 +00:00
Ancurio commented 2014-09-02 15:23:37 +00:00 (Migrated from github.com)

Previously, when the script names in the backtrace were in the form
'SectionXXX'/'{XXXX}' (default RMXP behavior), this same name would
be shown in the error message box, whereas RMXP always displays the
actual script name (eg. 'Scene_Map') instead; only with
useScriptNames=true was mkxp's behavior mostly correct.
Fix this by keeping a backtrace format -> actual script name mapping
and always using the script name in the message box.
The script name and line would also be parsed wrongly if the name
contained any colons, fix this by walking the exception string
back to front instead.

Also prepend the script index to the name when useScriptNames=true;
this is invaluable when debugging projects where multiple scripts
carry the same name. The format is 'XXX:Script_Name'.

@cremno : This touches on code you wrote, so I'd like to get your review on it please.

Previously, when the script names in the backtrace were in the form 'SectionXXX'/'{XXXX}' (default RMXP behavior), this same name would be shown in the error message box, whereas RMXP always displays the actual script name (eg. 'Scene_Map') instead; only with useScriptNames=true was mkxp's behavior mostly correct. Fix this by keeping a backtrace format -> actual script name mapping and always using the script name in the message box. The script name and line would also be parsed wrongly if the name contained any colons, fix this by walking the exception string back to front instead. Also prepend the script index to the name when useScriptNames=true; this is invaluable when debugging projects where multiple scripts carry the same name. The format is 'XXX:Script_Name'. @cremno : This touches on code you wrote, so I'd like to get your review on it please.
cremno commented 2014-09-02 17:31:02 +00:00 (Migrated from github.com)

I think it's okay.

I think it's okay.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MapleShrine/mkxp#64
No description provided.