locked
what is ''inline error handling'' RRS feed

  • Question

  • what does ''inline error handling'' mean in plain english pls

    thanks

    Wednesday, June 7, 2006 6:47 PM

Answers

  • In many ways you can consider inline error-handling is a simplified form of a try/catch block where you can specify in code something to the effect of:

    On Error Resume Next

    Or

    On Error Goto SomeLabel

    Ordinarily in an old school VB6 style program had a serious error, it would display a message and then quit... with the first line, rather than blowing up the app just executes the next line in the method while the second one would cause execution to move to an area defined by a label elsewhere where some error handling/logging can occur before sending execution back to the line following where it blew up.

    Does this make sense for you?

    I should mention that this sort of error handling is not advised for use in VB.NET, instead you should use try/catch blocks.

    Wednesday, June 7, 2006 6:53 PM
    Moderator

All replies

  • In many ways you can consider inline error-handling is a simplified form of a try/catch block where you can specify in code something to the effect of:

    On Error Resume Next

    Or

    On Error Goto SomeLabel

    Ordinarily in an old school VB6 style program had a serious error, it would display a message and then quit... with the first line, rather than blowing up the app just executes the next line in the method while the second one would cause execution to move to an area defined by a label elsewhere where some error handling/logging can occur before sending execution back to the line following where it blew up.

    Does this make sense for you?

    I should mention that this sort of error handling is not advised for use in VB.NET, instead you should use try/catch blocks.

    Wednesday, June 7, 2006 6:53 PM
    Moderator
  • Wednesday, June 7, 2006 6:53 PM
    Moderator
  • Thanks  a lot
    Wednesday, June 7, 2006 7:02 PM