How can I recover errors/warnings from: Compiler class>>evaluate:for:evaluationPools:logged:ifFail:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I recover errors/warnings from: Compiler class>>evaluate:for:evaluationPools:logged:ifFail:

John Small
Hi,

I'm invoking

       Compiler class>>
        evaluate: aString for: anObject evaluationPools: pools logged:
aBoolean ifFail: failBlock

which logs on the transcript any compilation warnings or errors.

I'd like to recover these notifications for use in my failBlock.

Any ideas on how I can capture these without monitoring the transcript?

The compiler library notifies the Compiler class somehow but I can't see
what it

then does with this information.

John


Reply | Threaded
Open this post in threaded view
|

Re: How can I recover errors/warnings from: Compiler class>>evaluate:for:evaluationPools:logged:ifFail:

Blair McGlashan
"John Small" <[hidden email]> wrote in message
news:[hidden email]...

> Hi,
>
> I'm invoking
>
>        Compiler class>>
>         evaluate: aString for: anObject evaluationPools: pools logged:
> aBoolean ifFail: failBlock
>
> which logs on the transcript any compilation warnings or errors.
>
> I'd like to recover these notifications for use in my failBlock.
>
> Any ideas on how I can capture these without monitoring the transcript?
>
> The compiler library notifies the Compiler class somehow but I can't see
> what it
>
> then does with this information.

Exceptions are raised, which can be trapped and handled in the normal way:
CompilerWarningNotification for warnings, and CompilerErrorNotification for
errors, both being subclasses of CompilerNotification. If you browse
references to CompilerErrorNotification you should find a number of
examples.

Regards

Blair