North-E
15 years agoOccasional 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.
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.