properties; discovery; exposing objects

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mk834tt@yahoo.com

    properties; discovery; exposing objects

    Low hours pilot here.

    I had a try/catch construct and had no idea what properties were
    available via the catch error object. I'm trying to figure out how to
    browse exposed properties. Is this a reliable way?

    I "seem" to be able to collect all the keys

    for (var x in er) {
    alert("key: " + x );
    }

    But accessing their values was hit and miss, for various reasons.

    I have firebug installed and see a lot of information exposed. I have
    a hard time with it. Is this error object, or other objects, exposed
    in any of the firebug panels? Most of the functions I open up report
    "prototype Object".

    Thank you.
  • RobG

    #2
    Re: properties; discovery; exposing objects

    On Feb 23, 7:41 am, mk83...@yahoo.c om wrote:
    Low hours pilot here.
    >
    I had a try/catch construct and had no idea what properties were
    available via the catch error object.  I'm trying to figure out how to
    browse exposed properties.  Is this a reliable way?
    >
    I "seem" to be able to collect all the keys
    >
    for (var x in er) {
      alert("key: " + x );
    >
    }
    >
    But accessing their values was hit and miss, for various reasons.
    >
    I have firebug installed and see a lot of information exposed.  I have
    a hard time with it.  Is this error object, or other objects, exposed
    in any of the firebug panels?  Most of the functions I open up report
    "prototype Object".
    Try:

    function foo(){
    try {
    foobar()
    } catch (e) {

    // Write the properties and values of e to the console
    console.dir(e);
    }
    }

    The properties are listed in the console on the left in bold with
    their values aligned on the right.

    --
    Rob

    Comment

    Working...