Permlink Replies: 5 - Pages: 1 - Last Post: 16-Mar-2018 15:40 Last Post By: davidekholm Threads: [ Previous | Next ]
davidekholm

Posts: 6,957
Registered: 18-Oct-2002
Improved error messages
Posted: 14-Mar-2018 23:06
  Click to reply to this thread Reply
During the development of the Zigzag skin it was apparent to me that the error messages of BeanShell are truly bad. What's especially tough is when BeanShell doesn't even get the line number of errors right. Sadly BeanShell is abandonware, but I took the time to somewhat improve the messages and line numbering, especially for errors occurring within onload.bsh. To try it out, do a core update of jalbum-core.jar and replace your lib/bsh-2.2.0.jar with this one .

What do you think?
jGromit

Posts: 15,135
Registered: 31-Jan-2006
Re: Improved error messages
Posted: 14-Mar-2018 23:26   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
Still 15.3.1?

Can't comment on the changes, since I don't use an interpreted onload.bsh in any skin. One of the big advantages of compiling the UI is that errors get caught in NetBeans, long before you even try to plug them into a skin. Using an interpreted onload.bsh, if the skin failed to load, all you knew was that something was wrong. There was virtually no way to figure out what it was.
RobM

Posts: 4,417
Registered: 4-Aug-2006
Re: Improved error messages
Posted: 14-Mar-2018 23:45   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
Having introduced various errors in an onload.bsh file the error reporting seems very accurate, as long as you remember the error is often in the line before that reported - that is a an extra } or a missing ; or , throws up an error on the next command.
davidekholm

Posts: 6,957
Registered: 18-Oct-2002
Re: Improved error messages
Posted: 15-Mar-2018 10:35   in response to: jGromit in response to: jGromit
  Click to reply to this thread Reply
jGromit wrote:
Still 15.3.1?

Can't comment on the changes, since I don't use an interpreted onload.bsh in any skin. One of the big advantages of compiling the UI is that errors get caught in NetBeans, long before you even try to plug them into a skin. Using an interpreted onload.bsh, if the skin failed to load, all you knew was that something was wrong. There was virtually no way to figure out what it was.


I didn't update the revision, but now I have (15.3.2). I agree that using a compiled UI is a better way forward when the skin's UI grows, but now I hope that the error messaging and line number referencing has improved so much that it's workable.
davidekholm

Posts: 6,957
Registered: 18-Oct-2002
Re: Improved error messages
Posted: 15-Mar-2018 10:36   in response to: RobM in response to: RobM
  Click to reply to this thread Reply
RobM wrote:
Having introduced various errors in an onload.bsh file the error reporting seems very accurate, as long as you remember the error is often in the line before that reported - that is a an extra } or a missing ; or , throws up an error on the next command.

Great! Yes, you're right. When missing a semicolon for instance, you usually see the error on the line below. That's normal for most parsers (technically you would be allowed to put the semicolon on the line below instead)
davidekholm

Posts: 6,957
Registered: 18-Oct-2002
Re: Improved error messages
Posted: 16-Mar-2018 15:40   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
I've now updated jAlbum's official archives to 15.3.2, including this fix. I won't push for these updates though (avoid update fatigue).
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums