Configuring exception handler in 3.0?

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

Configuring exception handler in 3.0?

Boris Popov, DeepCove Labs (SNN)

Is there a better API to change exception handler on an application? I looked, but got lost in the maze of configurations/defaults/filters/whatnot. Here’s what I have at the moment,

 

| app |

 app := WAAdmin register: self asApplicationAt: 'myapp'.

(app filters detect: #isExceptionFilter) configuration at: #exceptionHandler put: WADebugErrorHandler.

 app

  addLibrary: JQGoogleLibrary;

  addLibrary: JQUiGoogleLibrary

 

Thanks!

 

-Boris

 

--

+1.604.689.0322

DeepCove Labs Ltd.

4th floor 595 Howe Street

Vancouver, Canada V6C 2T5

http://tinyurl.com/r7uw4

 

[hidden email]

 

CONFIDENTIALITY NOTICE

 

This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments.

 

Thank you.

 


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Configuring exception handler in 3.0?

Sebastian Calvo
Yes,

I have to do the same but I don't know if there is a shutcut....

Cheers
 Sebastian

2009/9/19 Boris Popov <[hidden email]>:

> Is there a better API to change exception handler on an application? I
> looked, but got lost in the maze of configurations/defaults/filters/whatnot.
> Here’s what I have at the moment,
>
>
>
> | app |
>
>  app := WAAdmin register: self asApplicationAt: 'myapp'.
>
> (app filters detect: #isExceptionFilter) configuration at: #exceptionHandler
> put: WADebugErrorHandler.
>
>  app
>
>   addLibrary: JQGoogleLibrary;
>
>   addLibrary: JQUiGoogleLibrary
>
>
>
> Thanks!
>
>
>
> -Boris
>
>
>
> --
>
> +1.604.689.0322
>
> DeepCove Labs Ltd.
>
> 4th floor 595 Howe Street
>
> Vancouver, Canada V6C 2T5
>
> http://tinyurl.com/r7uw4
>
>
>
> [hidden email]
>
>
>
> CONFIDENTIALITY NOTICE
>
>
>
> This email is intended only for the persons named in the message header.
> Unless otherwise indicated, it contains information that is private and
> confidential. If you have received it in error, please notify the sender and
> delete the entire message including any attachments.
>
>
>
> Thank you.
>
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Configuring exception handler in 3.0?

Julian Fitzell-2
No, that's the way you have to do it at the moment. I agree it's not
very friendly and solving these interface problems is keeping us from
going to Beta, really, so if you have any suggestions, we're all ears.
:)

Certainly for this particular case we could add a method to either
WAAdmin or WAEntryPoint (or maybe both) to set the exception handler.
It could check if there is a filter, add it if not, and then set the
correct configuration value...

Would that help?

Julian

On 9/20/09, GallegO <[hidden email]> wrote:

> Yes,
>
> I have to do the same but I don't know if there is a shutcut....
>
> Cheers
>  Sebastian
>
> 2009/9/19 Boris Popov <[hidden email]>:
> > Is there a better API to change exception handler on an application? I
> > looked, but got lost in the maze of configurations/defaults/filters/whatnot.
> > Here’s what I have at the moment,
> >
> >
> >
> > | app |
> >
> >  app := WAAdmin register: self asApplicationAt: 'myapp'.
> >
> > (app filters detect: #isExceptionFilter) configuration at: #exceptionHandler
> > put: WADebugErrorHandler.
> >
> >  app
> >
> >   addLibrary: JQGoogleLibrary;
> >
> >   addLibrary: JQUiGoogleLibrary
> >
> >
> >
> > Thanks!
> >
> >
> >
> > -Boris
> >
> >
> >
> > --
> >
> > +1.604.689.0322
> >
> > DeepCove Labs Ltd.
> >
> > 4th floor 595 Howe Street
> >
> > Vancouver, Canada V6C 2T5
> >
> > http://tinyurl.com/r7uw4
> >
> >
> >
> > [hidden email]
> >
> >
> >
> > CONFIDENTIALITY NOTICE
> >
> >
> >
> > This email is intended only for the persons named in the message header.
> > Unless otherwise indicated, it contains information that is private and
> > confidential. If you have received it in error, please notify the sender and
> > delete the entire message including any attachments.
> >
> >
> >
> > Thank you.
> >
> >
> >
> > _______________________________________________
> > seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> >
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Configuring exception handler in 3.0?

Sebastian Calvo
Julian:

I have implemented an accessor for the exceptioHandler configuration
in a class that inherits from WAApplication so WAEntryPoint sounds
more intuitive for me than WAAdmin.

exceptionHandlerConfiguration

        ^(self filters detect: [:each | each isExceptionFilter] ifNone:
["This could happen?"]) ifNotNil: [:value | value configuration]

maybe we can add

exceptionHandler: aWAExceptionHandlerClass

self exceptionHandlerConfiguration
                at: #exceptionHandler put: aWAExceptionHandlerClass

Cheers
  Sebastian
2009/9/20 Julian Fitzell <[hidden email]>:

> No, that's the way you have to do it at the moment. I agree it's not
> very friendly and solving these interface problems is keeping us from
> going to Beta, really, so if you have any suggestions, we're all ears.
> :)
>
> Certainly for this particular case we could add a method to either
> WAAdmin or WAEntryPoint (or maybe both) to set the exception handler.
> It could check if there is a filter, add it if not, and then set the
> correct configuration value...
>
> Would that help?
>
> Julian
>
> On 9/20/09, GallegO <[hidden email]> wrote:
>> Yes,
>>
>> I have to do the same but I don't know if there is a shutcut....
>>
>> Cheers
>>  Sebastian
>>
>> 2009/9/19 Boris Popov <[hidden email]>:
>> > Is there a better API to change exception handler on an application? I
>> > looked, but got lost in the maze of configurations/defaults/filters/whatnot.
>> > Here’s what I have at the moment,
>> >
>> >
>> >
>> > | app |
>> >
>> >  app := WAAdmin register: self asApplicationAt: 'myapp'.
>> >
>> > (app filters detect: #isExceptionFilter) configuration at: #exceptionHandler
>> > put: WADebugErrorHandler.
>> >
>> >  app
>> >
>> >   addLibrary: JQGoogleLibrary;
>> >
>> >   addLibrary: JQUiGoogleLibrary
>> >
>> >
>> >
>> > Thanks!
>> >
>> >
>> >
>> > -Boris
>> >
>> >
>> >
>> > --
>> >
>> > +1.604.689.0322
>> >
>> > DeepCove Labs Ltd.
>> >
>> > 4th floor 595 Howe Street
>> >
>> > Vancouver, Canada V6C 2T5
>> >
>> > http://tinyurl.com/r7uw4
>> >
>> >
>> >
>> > [hidden email]
>> >
>> >
>> >
>> > CONFIDENTIALITY NOTICE
>> >
>> >
>> >
>> > This email is intended only for the persons named in the message header.
>> > Unless otherwise indicated, it contains information that is private and
>> > confidential. If you have received it in error, please notify the sender and
>> > delete the entire message including any attachments.
>> >
>> >
>> >
>> > Thank you.
>> >
>> >
>> >
>> > _______________________________________________
>> > seaside mailing list
>> > [hidden email]
>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >
>> >
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Configuring exception handler in 3.0?

Julian Fitzell-2
I added this method to WARequestHandler in Name: Seaside-Core-jf.570:

exceptionHandler: anExceptionHandlerClass
        | theFilter |
        theFilter := self filters
                detect: [ :ea | ea isExceptionFilter ]
                ifNone: [ self addFilter: WAExceptionFilter new ].
       
        theFilter configuration at: #exceptionHandler put: anExceptionHandlerClass

Julian

On Sun, Sep 20, 2009 at 4:12 PM, GallegO <[hidden email]> wrote:

> Julian:
>
> I have implemented an accessor for the exceptioHandler configuration
> in a class that inherits from WAApplication so WAEntryPoint sounds
> more intuitive for me than WAAdmin.
>
> exceptionHandlerConfiguration
>
>        ^(self filters detect: [:each | each isExceptionFilter] ifNone:
> ["This could happen?"]) ifNotNil: [:value | value configuration]
>
> maybe we can add
>
> exceptionHandler: aWAExceptionHandlerClass
>
> self exceptionHandlerConfiguration
>                at: #exceptionHandler put: aWAExceptionHandlerClass
>
> Cheers
>  Sebastian
> 2009/9/20 Julian Fitzell <[hidden email]>:
>> No, that's the way you have to do it at the moment. I agree it's not
>> very friendly and solving these interface problems is keeping us from
>> going to Beta, really, so if you have any suggestions, we're all ears.
>> :)
>>
>> Certainly for this particular case we could add a method to either
>> WAAdmin or WAEntryPoint (or maybe both) to set the exception handler.
>> It could check if there is a filter, add it if not, and then set the
>> correct configuration value...
>>
>> Would that help?
>>
>> Julian
>>
>> On 9/20/09, GallegO <[hidden email]> wrote:
>>> Yes,
>>>
>>> I have to do the same but I don't know if there is a shutcut....
>>>
>>> Cheers
>>>  Sebastian
>>>
>>> 2009/9/19 Boris Popov <[hidden email]>:
>>> > Is there a better API to change exception handler on an application? I
>>> > looked, but got lost in the maze of configurations/defaults/filters/whatnot.
>>> > Here’s what I have at the moment,
>>> >
>>> >
>>> >
>>> > | app |
>>> >
>>> >  app := WAAdmin register: self asApplicationAt: 'myapp'.
>>> >
>>> > (app filters detect: #isExceptionFilter) configuration at: #exceptionHandler
>>> > put: WADebugErrorHandler.
>>> >
>>> >  app
>>> >
>>> >   addLibrary: JQGoogleLibrary;
>>> >
>>> >   addLibrary: JQUiGoogleLibrary
>>> >
>>> >
>>> >
>>> > Thanks!
>>> >
>>> >
>>> >
>>> > -Boris
>>> >
>>> >
>>> >
>>> > --
>>> >
>>> > +1.604.689.0322
>>> >
>>> > DeepCove Labs Ltd.
>>> >
>>> > 4th floor 595 Howe Street
>>> >
>>> > Vancouver, Canada V6C 2T5
>>> >
>>> > http://tinyurl.com/r7uw4
>>> >
>>> >
>>> >
>>> > [hidden email]
>>> >
>>> >
>>> >
>>> > CONFIDENTIALITY NOTICE
>>> >
>>> >
>>> >
>>> > This email is intended only for the persons named in the message header.
>>> > Unless otherwise indicated, it contains information that is private and
>>> > confidential. If you have received it in error, please notify the sender and
>>> > delete the entire message including any attachments.
>>> >
>>> >
>>> >
>>> > Thank you.
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > seaside mailing list
>>> > [hidden email]
>>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>> >
>>> >
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside