realbasic-nug
[Top] [All Lists]

Re: Two questions about Exceptions

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Two questions about Exceptions
From: Ian Piper <ianpiper at mac dot com>
Date: Tue, 27 Feb 2007 23:08:04 +0000
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <889DDFA3-D53C-4270-894B-E40B626A9C70 at mac dot com> <EDF7BB3D-8E50-4A92-896E-C0669818540E at gmail dot com> <684C860F-0810-456B-B9E1-43BB8CDBE21D at mac dot com> <5d7ca37e0702271238t58beaeb4mb4bb8021fe6292f0 at mail dot gmail dot com>
Hi Math,

That was it. I removed that first Exception and it all works fine.

Thanks very much to all of you who helped me out on this.


Ian.
--





On 27 Feb 2007, at 8:38 pm, Mathieu Langlois wrote:

> Huh, what is an AssertionException?  Did you create that custom
> exception?  Because this is not a valid RB exception.
>
> Math
>
> On 2/27/07, Ian Piper <ianpiper at mac dot com> wrote:
>> It's no good - there is something basic here that I can't get  
>> working.
>>
>> Here is what I have now done.
>>
>> In my methods module I have created a function with global scope
>> called processErrors(err as RuntimeException, where as String,
>> message as String), returning a String. In that function I have
>> pasted all of the if statements:
>>
>>    if err ISA AssertionException then
>>      return "AssertionException"
>>    elseif err ISA FunctionNotFoundException then
>>      return "FunctionNotFoundException"
>>    elseIf err ISA IllegalCastException then
>>      return "IllegalCastException"
>> [etc]
>>
>> (I know I am not making any use of the string arguments. I'm not that
>> far along!). But even before trying to write any code to use this
>> Function I get this error on compiling:
>>
>> "There is no class with this name." next to the first line ("if err
>> ISA AssertException then")
>>
>> You can see a couple of screenshots here, just to show that I'm not
>> imagining it:
>>
>> http://www.tellura.co.uk/examples/rb_runtime_error_1.jpg
>> http://www.tellura.co.uk/examples/rb_runtime_error_2.jpg
>>
>> I assume the message refers to AssertException since this is
>> highlighted in the bug window. Finally, the error is the same whether
>> the function signature is "err" or "Extends err".
>>
>> I'm sure I'm doing something boneheaded, and I'm tearing out what
>> little remains of my hair...
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>