Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Custom Exception

Custom Exception

Scheduled Pinned Locked Moved C#
csharpwinformshelplearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 334793
    wrote on last edited by
    #1

    Hi Guys! we know that there is a way to handle custom exceptions in asp dot net by specify the error page. is there any way to do the same in csharp windows form. i.e custom windows form. i don't want to write try/catch block in my programm in all places.i just want to write it once where it can handle all the program exception. is there a way. i want to write only one try/catch block that can handle all the exceptions of the whole applications(windows Application), which off-course may contains multiple windows forms Ali Khan

    H 1 Reply Last reply
    0
    • U User 334793

      Hi Guys! we know that there is a way to handle custom exceptions in asp dot net by specify the error page. is there any way to do the same in csharp windows form. i.e custom windows form. i don't want to write try/catch block in my programm in all places.i just want to write it once where it can handle all the program exception. is there a way. i want to write only one try/catch block that can handle all the exceptions of the whole applications(windows Application), which off-course may contains multiple windows forms Ali Khan

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      AppDomain.UnhandledException You can get the current AppDomain with AppDomain.Current.

      -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups