event.stopExecution() in Before Form event

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Ian, Dave, jcoulson, Jon, Wai

Segi
Ebase User
Posts: 579
Joined: Mon Dec 09, 2013 6:37 pm

event.stopExecution() in Before Form event

#1

Postby Segi » Mon May 13, 2019 5:51 pm

Is it normal that if you call event.stopExecution() in a Before Form event, it throws a java.lang.NullPointerException but doing something like form.abort("This event is done") it does not throw a null pointer exception ?

Is this the way its supposed to be ?
0 x

Jon
Moderator
Moderator
Posts: 1256
Joined: Wed Sep 12, 2007 12:49 pm

Re: event.stopExecution() in Before Form event

#2

Postby Jon » Tue May 14, 2019 7:49 am

No it's a bug, stopExecution() should just (silently) stop execution of the event. abort() should abort execution of the form and show an error to the user.
0 x

Segi
Ebase User
Posts: 579
Joined: Mon Dec 09, 2013 6:37 pm

Re: event.stopExecution() in Before Form event

#3

Postby Segi » Tue May 14, 2019 2:51 pm

Ok thanks for clearing that up.

I've replaced event.stopExecution with form.abort for now to prevent my server logs from being filled with pointless null pointer exceptions.
0 x


Who is online

Users browsing this forum: Bing [Bot] and 1 guest