As a C# developer I\'m used to the following style of exception handling:
try
{
throw SomeException(\"hahahaha!\");
}
catch (Exception ex)
{
Log(ex.T
You can use almost in the same manner ie.
try
{
throw new Error("hahahaha!");
}
catch (e)
{
alert(e.message)
}
But if you want to get line number and filename where error is thrown i suppose there is no crossbrowser solution. Message and name are the only standart properties of Error object. In mozilla you have also lineNumber and fileName properties.