Ask a Question

Exception object's properties

North-E
Occasional Contributor

Exception object's properties

Hi, everybody!



I use "try...catch" construction for catching exceptions in my tests. For example:



try

{

...

}

catch(e)

{

Log.Error(e.description);

}



I can get exception's message via description property but sometimes it's not enough for understanding the kind of mistake. Usually, I need to know the line number where exception has occured or was thrown at. Are there any properties I can get from cought exception? I was looking in documentation and searching here but didn't find it.
2 REPLIES 2

RE: Exception object's properties


Hello Dmitriy,





JScript's Error object provides the following properties: description, message, name and number. For more information about the properties, please visit the following web page:

http://msdn.microsoft.com/en-us/library/dww52sbt.aspx
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
North-E
Occasional Contributor

RE: Exception object's properties

Thank you, David.
cancel
Showing results for 
Search instead for 
Did you mean: