Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Exceptions traceable at console

#83

Problem

In V0.7.4 if you don't register a listener to catch errors, then your fatal SceneJS errors will appear in the console as "[object, object]", which is a SceneJS exception instance. Futhermore, exceptions were being thrown from within SceneJS's error handler, not from the actual place where the exception occurred.

Solution

Have the handler return the exception message, for the caller to then throw as an exception:

...
    if (!params.uri) {
       throw SceneJS_errorModule.fatalError(new SceneJS.NodeConfigExpectedException("SceneJS.Load parameter expected: uri"));   
    }
...

To be able to tie the exception back to information in documentation, prefix the exception message with the SceneJS exception class name:

SceneJS.InvalidNodeConfigException = function(msg, cause) {
    this.message="SceneJS.InvalidNodeConfigException: " + msg ;
    this.cause = cause;
};

Reported by lindsay.kay (at xeolabs) · May 20th, 2010 @ 07:20 AM

State: resolved
Milestone: V0.7.5

Activity

No comments yet.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.