473,385 Members | 1,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.
Feb 22 '08 #1
1 1431
On Feb 23, 7:41*am, mk83...@yahoo.com 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
Feb 22 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Generic Usenet Account | last post by:
A lot has been said in this newsgroup regarding the "evil" set/get accessor methods. Arthur Riel, (of Vanguard Training), in his class, "Heuristis for O-O Analysis & Design", says that there is...
9
by: kj | last post by:
Is there any way to programmatically discover and inspect *all* the properties of an object, even those that are not enumerable through a for/in loop? Thanks! kj -- NOTE: In my address...
1
by: Jamus Sprinson | last post by:
Before I continue, I'm going to begin by saying I'm not by any means an expert- I've been using .NET with C# for about 4 months now, and basically just learning by example and docs. A game...
8
by: Rakesh | last post by:
Hi, Suppose I have a class definition like this: public class CBase { public string m_Name = "asd"; public string Name { get
3
by: Dave Veeneman | last post by:
Is there a way to expose an internal class as a public property of its parent object? Let's say I have a Customer object with Public accessibility. It has an Addresses collection property that it...
26
by: julien | last post by:
Hello, I don't know when to use fields and when to used properties. It looks to me that using properties is always better. But I guess fields must be better in some cases, otherwise they wouldn't...
5
by: Sergio Montero | last post by:
I have a MustInherits Base class that implements a custom IDataLayer interfase. IDataLayer expose CRUD methods. Base class constructor requires two parameters: ConnectionString TableName ...
6
by: Dom | last post by:
I have a class that has a System.Drawing.Rectangle as a member, called m_Rect. I set it up as a property, like this: get { return m_Rect;} set { m_Rect = value;} Now in my main code I want...
6
by: egaskill | last post by:
So I'm trying to figure out something...we need our company's internal PHP based intranet site redone as it runs horribly. We recently hired a company to come in and take a look at the code and...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.