Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Exception Handling
Mon, Dec 19 2011 4:54 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

<html>
 <head>

   <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
 </head>
 <body bgcolor="#FFFFFF" text="#000000">
   This code will no longer compile, it says: &nbsp;&nbsp;&nbsp; <b>The referenced
     type TError does not exist</b><br>
   <br>
   &nbsp; try
   <br>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //... do something ...<br>
   &nbsp;&nbsp; except
   <br>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON E:TError do
   <br>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ErrorMessageEdit.Text :=&nbsp; E.Message;
   <br>
   &nbsp;&nbsp; end;
   <br>
   <div class="moz-signature">-- <br>
     Chris Holland<br>
     [Team Elevate]
   </div>
 </body>
</html>
Mon, Dec 19 2011 7:46 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Chris,

<< This code will no longer compile, it says:     The referenced type TError
does not exist >>

Include WebDOM in your uses clause.  I moved some DOM/core JS stuff from
other units (WebCore, WebHTTP) into the WebDOM unit in order to consolidate
the external references in one place.

--
Tim Young
Elevate Software
www.elevatesoft.com
Mon, Dec 19 2011 7:49 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

Thanks Tim, that has fixed it.

Chris Holland [Team Elevate]

On 19/12/2011 12:46, Tim Young [Elevate Software] wrote:
> Chris,
>
> << This code will no longer compile, it says:     The referenced type
> TError does not exist >>
>
> Include WebDOM in your uses clause.  I moved some DOM/core JS stuff
> from other units (WebCore, WebHTTP) into the WebDOM unit in order to
> consolidate the external references in one place.
>
Mon, Dec 19 2011 9:14 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Chris,

<< Thanks Tim, that has fixed it. >>

Just so you know, this triggered me to "fix" the whole Error/Exception
naming in the compiler, so be prepared to do some renaming in the next
build, also.  In general, I made all of the exception handling/naming more
Delphi-like, and now you can use a normal EException class from the WebCore
unit, and the compiler now enforces the 'E' prefix on exception classes.

This will allow you to use the exception handling without having to
explicitly reference the WebDOM unit, which isn't included by default with
most auto-created units.  WebCore, however, *is* included by default, so
this will work much better for everyone.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image