Catch Error

  • Thread starter Thread starter Matías
  • Start date Start date
M

Matías

When I have an exception I use
try {
} catch(Exception e) {
print e.Message (for example)
}

Now, I want to catch the error message and the line number of the error. How
can I do that, I have to put numbers to lines???. Thanks for Your help.
 
Hi,

You can't trace number of the problematic line since source is compiled. But
Visual Studio should highlight such line if there'll raise any exception
while debugging.
 
wrote:
When I have an exception I use
try {
} catch(Exception e) {
print e.Message (for example)
}

Now, I want to catch the error message and the line number of the error. How
can I do that, I have to put numbers to lines???. Thanks for Your help.


That's the job of a debugger. This would be useless in the released
product.

Hope that helps,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top