Iliad sometimes doesn't display error messages

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

Iliad sometimes doesn't display error messages

ZuLuuuuuu-2
Hello,

I sometimes don't get any error messages although my application stops
working. I don't know how to express it exactly but, for example, I
have a widget with some methods for building the contents, the
beginning of one of the building methods is like this:


linkContents
        ^[:e |
                self application user loggedIn
                        ifTrue: [
                                e img
                                        src: self settings publicFolderPath, '/skins/', self settings
defaultSkinName, '/images/post_topic.gif';
                                        alt: (self application translate: 'Post New Topic').


The problem here is on this line:


alt: (self application translate: 'Post New Topic').


There should be a "Key not found: Post New Topic" error since
translate method looks up the key 'Post New Topic' in a dictionary but
there is no key like that. So my Iliad application stops working (it
renders the content but actions doesn't work etc. But it does not
display any error.

I transported the same code into the initialize method of my
application as:


self translate: 'Post New Topic'


and it gives the expected error.

This happened for other kind of errors, as well. But I cannot decide
when it happens and when it doesn't happen.

What might be the problem?


Canol
Reply | Threaded
Open this post in threaded view
|

Re: Iliad sometimes doesn't display error messages

ZuLuuuuuu-2
By the way, I guess some similar problems has occurred in previous
versions of Iliad, my version is 0.8.1 on Squeak 4.1.

On Jun 10, 2:37 pm, ZuLuuuuuu <[hidden email]> wrote:

> Hello,
>
> I sometimes don't get any error messages although my application stops
> working. I don't know how to express it exactly but, for example, I
> have a widget with some methods for building the contents, the
> beginning of one of the building methods is like this:
>
> linkContents
>         ^[:e |
>                 self application user loggedIn
>                         ifTrue: [
>                                 e img
>                                         src: self settings publicFolderPath, '/skins/', self settings
> defaultSkinName, '/images/post_topic.gif';
>                                         alt: (self application translate: 'Post New Topic').
>
> The problem here is on this line:
>
> alt: (self application translate: 'Post New Topic').
>
> There should be a "Key not found: Post New Topic" error since
> translate method looks up the key 'Post New Topic' in a dictionary but
> there is no key like that. So my Iliad application stops working (it
> renders the content but actions doesn't work etc. But it does not
> display any error.
>
> I transported the same code into the initialize method of my
> application as:
>
> self translate: 'Post New Topic'
>
> and it gives the expected error.
>
> This happened for other kind of errors, as well. But I cannot decide
> when it happens and when it doesn't happen.
>
> What might be the problem?
>
> Canol
Reply | Threaded
Open this post in threaded view
|

Re: Iliad sometimes doesn't display error messages

Nicolas Petton
In reply to this post by ZuLuuuuuu-2
Le jeudi 10 juin 2010 à 04:37 -0700, ZuLuuuuuu a écrit :
> There should be a "Key not found: Post New Topic" error since
> translate method looks up the key 'Post New Topic' in a dictionary but
> there is no key like that. So my Iliad application stops working (it
> renders the content but actions doesn't work etc. But it does not
> display any error.

So the application renders the content even if the translation is not
found? What is rendered then, the not translated alt text?

Also, what happens if you try to evaluate an action?

Cheers,
Nico

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Iliad sometimes doesn't display error messages

ZuLuuuuuu-2
Sorry, I take it back, it is not rendered.

I have an action which is bind to a login form widget which makes a
user logged in. At the end of this action I have:

self application menuWidget markDirty. "This executes the
#linkContents method I posted above"
self hide. "This hides the form which is used for hiding the login
form"

So when I press the submit button on the form it should login the user
(it does that successfully) then rebuilt the menuwidget then hide the
login form. But it does not rebuilt the menuWidget nor it hides the
login form, and does not show any error. When I comment out the
markDirty line which causes the #linkContents method to be executed,
like this:

"self application menuWidget markDirty."
self hide.

Then the application works fine, hides the login form etc. But of
course does not rebuilt the menuWidget.


On Jun 10, 3:10 pm, Nicolas Petton <[hidden email]> wrote:

> Le jeudi 10 juin 2010 à 04:37 -0700, ZuLuuuuuu a écrit :
>
> > There should be a "Key not found: Post New Topic" error since
> > translate method looks up the key 'Post New Topic' in a dictionary but
> > there is no key like that. So my Iliad application stops working (it
> > renders the content but actions doesn't work etc. But it does not
> > display any error.
>
> So the application renders the content even if the translation is not
> found? What is rendered then, the not translated alt text?
>
> Also, what happens if you try to evaluate an action?
>
> Cheers,
> Nico
>
>  signature.asc
> < 1KViewDownload
Reply | Threaded
Open this post in threaded view
|

Re: Iliad sometimes doesn't display error messages

Nicolas Petton
Ok then, I think I may know where it comes from.
Do you have your error when you disable javascript?

Cheers,
Nico

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Iliad sometimes doesn't display error messages

ZuLuuuuuu-2
Yes, I have :)

Nicolas Petton wrote:
> Ok then, I think I may know where it comes from.
> Do you have your error when you disable javascript?
>
> Cheers,
> Nico
Reply | Threaded
Open this post in threaded view
|

Re: Iliad sometimes doesn't display error messages

Nicolas Petton
Le jeudi 10 juin 2010 à 05:50 -0700, ZuLuuuuuu a écrit :
> Yes, I have :)

Ok. It seems the javascript layer eats the error response :/
In that case you'll have to reload the page to see it.

You can always debug it if you turn debug mode on:
ILErrorHandler debugMode

Then any error with open a debugger on it.

Cheers,
Nico

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Iliad sometimes doesn't display error messages

ZuLuuuuuu-2
Nicolas Petton wrote:
>
> Ok. It seems the javascript layer eats the error response :/
> In that case you'll have to reload the page to see it.


Yes, when I reload the page the error is shown.


>
> You can always debug it if you turn debug mode on:
> ILErrorHandler debugMode
>
> Then any error with open a debugger on it.


This is great, I was looking for this feature all along!

By the way, seeing that the application still works even when I
disabled the js was pretty impressive :) I read about it on the site
but didn't try before heh.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad sometimes doesn't display error messages

Nicolas Petton

> > You can always debug it if you turn debug mode on:
> > ILErrorHandler debugMode
> >
> > Then any error with open a debugger on it.
>
>
> This is great, I was looking for this feature all along!

Hehe :) You can choose from 3 different error handling modes:

- deployment: errors will show an error 500 in the browser without more
explanation
- verbose: same thing but with the stacktrace
- debug: errors will open debuggers

See the class comment of ILErrorHandler.

>
> By the way, seeing that the application still works even when I
> disabled the js was pretty impressive :) I read about it on the site
> but didn't try before heh.

Thanks :)

Nico

signature.asc (205 bytes) Download Attachment