You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Werner Punz (JIRA)" <de...@myfaces.apache.org> on 2014/06/23 11:46:25 UTC

[jira] [Resolved] (MYFACES-3902) jsf.js: error handling output improvement

     [ https://issues.apache.org/jira/browse/MYFACES-3902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Werner Punz resolved MYFACES-3902.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.4-SNAPSHOT
                   2.1.16-SNAPSHOT
                   2.0.22-SNAPSHOT

> jsf.js: error handling output improvement
> -----------------------------------------
>
>                 Key: MYFACES-3902
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3902
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.2.3
>         Environment: Snapshot code 2.2.3 from trunk + Icefaces 4/Primefaces 4 
> Firefox >=18
>            Reporter: Krashan Brahmanjara
>             Fix For: 2.0.22-SNAPSHOT, 2.1.16-SNAPSHOT, 2.2.4-SNAPSHOT
>
>
> Myfaces core do not show real javascipt errors.
> In _Dom.js there is a catch block in rows 192-203.
> Unofortunately I see two errors
> - Icefaces js has exceptions without message and description a message is directly a 'e' object. So an error 'invalid property' is printed to console
> - development mode is ignored by this catch block, in reverse order checking too because jsf.ajax.getProjectStage() is not initialized
> Workaround - because development mode is recognized we can only show an alert
> {noformat}
>         } catch (e) {
> /*
>             if(window.console && window.console.error) {
>                //not sure if we
>                //should use our standard
>                //error mechanisms here
>                //because in the head appendix
>                //method only a console
>                //error would be raised as well
>                 if (e.message) {
>                   window.console.error(e.message);
>                 } else {
>                     if (e.description) {
>                       window.console.error(e.description);
>                     } else {
>                       window.console.error(e);
>                     }
>                }
>             }
>             if(jsf.ajax.getProjectStage() === "Development") {
> */
> 				if (e.message) {
> 				  alert("Error in evaluated javascript:"+ (e.message));
> 				} else {
> 					if (e.description) {
> 					  alert("Error in evaluated javascript:"+ (e.description));
> 					} else {
> 					  alert("Error in evaluated javascript:"+ (e));
> 					}
> 				}
> /*
>             }
> */
>        } finally {
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)