[Borges-users] ErrorPage

Eric Hodel drbrain at segment7.net
Mon Apr 19 04:54:45 EDT 2004


??????? ???????? (slepnev_v at rambler.ru) wrote:

> I'm trying to use ErrorPage. Already found two errors.
> 
> Borges::WalkBackPage#debug should be
> 
> def debug
>   @exception.defaultAction
> end

#debug really doesn't mean anything at all.  In Seaside it would pull up
the stack and let you walk and play with it.  Ruby doesn't allow those
kinds of things. :(

> Otherwise we get an error: 'exception' has wrong number of arguments - 
> 0 for 1. This way it doesn't work either, because not all exceptions 
> have a defaultAction

I'll just rip this right out, since it can't do anything useful.

> (what naming convention is this anyway, Java? =)

Smalltalk.  Many of the methods in Borges are still oddly named, because
Smalltalk methods are keyword-like.  I simply concatenated each part of
the method name with an underscore when first porting from Seaside.  The
most glaring example of this is #list_do, which should just be #list.

> Borges::ErrorPage#show should be
> 
> def show
>     res = Borges::GenericResponse.new('text/html')
>     res << "<h1>500 - Error</h1><p>There has been an internal error. 
> The system administrator has been notified."
>     session.return_response(res)
> end

Ok, done.

-- 
Eric Hodel - drbrain at segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/borges-users/attachments/20040419/3a96e202/attachment.bin


More information about the Borges-users mailing list