This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: throws: keyword in class method


On 08/06/2010 05:27 PM, Per Bothner wrote:
> On 08/06/2010 08:44 AM, John Whittaker wrote:
>> My kawa documentation tells me that I ought to be able to declare a
>> method to
>> throw an exception like the example below shows:
>>
>> (define-simple-class<MyTask>  ( )
>>
>>    ((execute ) ::<void>   throws: (<java.lang.Exception>  )
>>      (display "hello")
>>     ))
>>
>>
>> But when I do that, kawa complains:
>>
>> /dev/stdin:4:34: throws not followed by a classname
>> java.lang.NullPointerException
>>      at gnu.expr.LambdaExp.addMethodFor(LambdaExp.java:1076)
>
> I checked in a fix for this.  I also improved the error handling.
>
> (The problem was that a specifier like <java.lang.Exception>
> was resolved at name-resolution time to a QuoteExp (in the case
> that we have a known existing class), and the code had not
> been updated for this.)
Thanks, Per.  It is working now.

John Whittaker


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]