Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Abort equivalent?
Wed, Mar 13 2019 2:37 PMPermanent Link

Matthew Jones

Is there an equivalent to Abort in EWB? Something that stops the current execution stack, but raises no error dialog or anything?

--

Matthew Jones
Wed, Mar 13 2019 3:02 PMPermanent Link

Matthew Jones

Matthew Jones wrote:

> Is there an equivalent to Abort in EWB? Something that stops the current execution stack, but raises no error dialog or anything?

Related to this, I don't think Exceptions work as documented.

type

EAbortException = Exception;

....

raise EAbortException.Create('');
// this is output as: throw new ("");

....

function TfrmAdminWelcome.ErrorHandler...

// including this stops the output of the loader:
   if (Sender is EAbortException) then
       exit;

Not really a problem - I'll include a magic string in the normal exception, but the manual implies this should work, I think.

--

Matthew Jones
Thu, Mar 21 2019 11:39 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< Related to this, I don't think Exceptions work as documented. >>

It's a JavaScript issue - you can throw Exception descendants, but cannot test for them properly, so EWB just outputs the base Exception instances.  This is mentioned in the manual here:

https://www.elevatesoft.com/manual?action=viewtopic&id=ewb2&topic=Exception_Handling

in the red box:

"While you can create new exception classes that descend from the base Exception class for design-time usage, you cannot do so for run-time usage. Some of the modern web browser implementations of JavaScript do not properly deal with exception class descendants in terms of reporting the proper error message and source line number of the error."

I'll revisit this with EWB 3 and see if the current crop of browsers has improved at all.

Tim Young
Elevate Software
www.elevatesoft.com
Image