Jump to content

Playground Line Error #?


Pryme8
 Share

Recommended Posts

I really like the idea of the playground, but the one problem that I am running into that is deterring me from continuing to use it, is that when you drop and error it does not tell you where...  cant covert obj from null, cool where?  expecting } after blah blah, cool where?!?

I know this kinda sounds like im complaining but Im not.  I was wondering what would be a way for me to figure out what line needs to be looked at when working in the playground because my console reports are all sorts of overloaded with other information coming from the playground and I cant seem to efficiently pick through simple errors.

Link to comment
Share on other sites

 var showError = function (errorMessage) {
        var errorContent = '<div class="alert alert-error"><button type="button" class="close" data-dismiss="alert">&times;</button><h4>Compilation error</h4>' +
                                errorMessage + '</div>';

        document.getElementById("errorZone").innerHTML = errorContent;
    }


If I can get a console.log(errorMessage)  I can take a look at that Object and see if that information is stored anywhere... looks like it might be a quick fix!

**EDIT**

Yup I reviewed the error process, and want to fix it...

I made an intentional error called peculiarly enough "error" as an undefined variable in a try catch loop so I can confirm that the error object was in standard format...
 
ReferenceError: error is not defined
Stack trace:
createScene@http://www.babylonjs-playground.com/index.js line 207 > eval:80:3
compileAndRun@http://www.babylonjs-playground.com/index.js:208:25
checkHash/xmlHttp.onreadystatechange@http://www.babylonjs-playground.com/index.js:511:33
EventHandlerNonNull*checkHash@http://www.babylonjs-playground.com/index.js:503:21
@http://www.babylonjs-playground.com/index.js:536:5
@http://www.babylonjs-playground.com/index.js:1:2

is the information that is passed to me and in the object it has the exact line of the error, if this happens not to be the one we want I will come up with a simple calculation to count the number of lines on the DOM on top of the line we want and offset it so the number in the playground line matchs the error.

If you guys give me the information I need to edit the playground and then submit the changes I will have a much more robust error system done for us before I go to bed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...