How to locate where a JavaCode exception was thrown (Bozza) |
|
|
When you receive some [http://www.javaworld.com/javaworld/jw-07-1998/jw-07-exceptions.html|exception] trace (see [JSup Application properties#Options]) from [JavaCode] you can find where the [JavaCode] that thrown the [http://www.javaworld.com/javaworld/jw-07-1998/jw-07-exceptions.html|exception] is located:
- Identify the exception trace from the [JSup Output window|Output window] or from the [JSup standard output file|standard output file].
- Identify the line that is referred to a $jsup$_????_funcs class (in the example below it is the first line of the trace, but it is not always so easy...):
at $jsup$_win1_funcs.$win1$_f27($jsup$_win1_funcs.java:210)
- The number at the end of the line (210) tell you the line number.
- The part of the class name (replaced by ???? above) tell you which is the [JSup Code script container|container of the script] that thrown the exception; for example:
- domain0: the exception was thrown in a [JSup domains|Shared domain] script. Go to menu File / Application properties / Edit SHARED code / JavaCode common.
- domain1: the exception was thrown in a [JSup domains|User domain] script. Go to menu File / Application properties / Edit USER code / JavaCode common.
- winXX: means that the exception was thrown by a [JSup Code script container|script] or an [JSup Animations|animation] located in the [JSup graphic windows|window] with id = XX. If you don't know which is that [JSup graphic windows|window] (because more than a [JSup graphic windows|window] is currently displayed or because you are performing an "a posteriori" analysis of a [JSup standard output file|log]) then you can find the ID of window in the [JSup Window property dialog|Window property dialog] or by viewing the content of the file win000XX.jw in the [JSup application#Directory|application directory] (the name of the [JSup graphic windows|window] is on the second line of that file). When you have opened that window in the [JSup Graphic editor|Graphic editor] go to menu Window / Window properties / JavaCode
In the tab found above you have to click the View translated Java with line number button.
In the window that will appear scroll to the line number 210 (in the example) and see which is the code.

The comment at the beginning of the function tells you that the code correspond to the [JavaCode] of the [JSup Action animation|Action animation] of the [JSup Graphic objects|graphic object] whose path is //prova/#65/Button 'Error Test button' #0
prova is the name of [JSup graphic windows|window], #65 is the automatic name given to the binder that contain the [JSup Button|button] named Error Test button where the [JSup Action animation|Action animation] is located.
You can use the [JSup Graphic navigation|navigation window] ( toolbar button or Ctrl+N keys) to locate and select the [JSup Graphic objects|graphic object].
|