Force an UnhandledExceptionError?

  1. 2 weeks ago

    Tim J

    Feb 9 Pre-Release Testers N. Phoenix, AZ

    Hi Folks,

    I've made major modifications tio the manner in which two of my apps deal with Unhandled Exception Errors. Of course, I can never seem to duplicate the errors that a select few of our customers witness making it very hard to test and validate my code.

    Do any of you have pointers to offer that will allow me to actually cause such an error in my code?

    Thanks

    You can create and raise your own exceptions:

    dim e as RuntimeException
    e.Message = "Nothing to see here."
    Raise e
  2. Anthony C

    Feb 9 Pre-Release Testers, Xojo Pro, XDC Speakers, Third Party Store, Forum Moderators, MVP Answer GraffitiSuite Developer

    You can create and raise your own exceptions:

    dim e as RuntimeException
    e.Message = "Nothing to see here."
    Raise e
  3. Tim J

    Feb 9 Pre-Release Testers N. Phoenix, AZ

    Excellent - thanks, Anthony.

  4. Anthony C

    Feb 9 Pre-Release Testers, Xojo Pro, XDC Speakers, Third Party Store, Forum Moderators, MVP GraffitiSuite Developer

    Happy to help, Tim!

  5. Tim J

    Feb 9 Pre-Release Testers N. Phoenix, AZ

    One fix -

    Dim e As New RuntimeException

    The New is needed :)

or Sign Up to reply!