Results 1 to 4 of 4

Thread: Exception not being handled

  1. #1

    Thread Starter
    Hyperactive Member greg_quinn's Avatar
    Join Date
    Nov 2002
    Location
    South Africa
    Posts
    366

    Exception not being handled

    In my app I am trying to print to a network printer.

    When the printer is not available, and I try to print to it, I get a System.ComponentModel.Win32Exception in system.drawing.dll. "The RPC Server could not be found".

    How can I catch this error?

    I have tried

    Try
    Catch objError as System.ComponentModel.Win32Exception
    End Try

    and a whole bunch of other exception types, but nothing can seem to trap this error.

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    VB Code:
    1. Try
    2. ...
    3. Catch Error as System.Exception
    4. ...
    5. End Try
    \m/\m/

  3. #3

    Thread Starter
    Hyperactive Member greg_quinn's Avatar
    Join Date
    Nov 2002
    Location
    South Africa
    Posts
    366
    Nope, I've already tried that

  4. #4
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    what about trying to catch an Object rather than an instance?

    Maybe that error doesn't inherit from the standard exception family.

    Just a guess

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width