Categories > Coding > C# >

How to catch all exceptions

Posts: 10

Threads: 2

Joined: Jan, 2017

Reputation: -2

Posted

As the title says how to catch all exceptions in C#

 

not using

try
{

}
catch (exception)
{

}

  • 0

Hey I'm the first person on Wearedevs.net!

Posts: 870

Threads: 34

Joined: Aug, 2020

Reputation: 6

Replied

https://docs.microsoft.com/en-us/dotnet/api/system.appdomain.unhandledexception?view=net-5.0

 

I'm not giving you codes lol go learn that, It should catch all unhandled exceptions around the domain

  • 0

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

Maximus is gay so i'll just give it to you. Just do:

try
{

}
catch
{

}
  • 0

Posts: 10

Threads: 2

Joined: Jan, 2017

Reputation: -2

Replied

as i said i don't want to use 
Try
{
}
catch(exception)
{
}

Method i already know it but im trying to catch all unexpected exceptions in a class

so whenever any exception happens it just shows a messagebox

  • 0

Added

@MaximusExploit
thanks for nothing

  • 0

Hey I'm the first person on Wearedevs.net!

Posts: 870

Threads: 34

Joined: Aug, 2020

Reputation: 6

Replied


@Bot READ THE APPDOMAIN UNHANDLED EXCEPTION, THE LINK I GAVE YOU OMG

  • 0

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

@Bot ...then read the docs man it's right there.

  • 0

Wabz

Winning.js

Posts: 2410

Threads: 194

Joined: Apr, 2020

Reputation: 27

Replied

@MaximusExploit stop acting so toxic...

  • 0

My new discord is Wabz#1337 with ID 777154062789509130

Posts: 10

Threads: 2

Joined: Jan, 2017

Reputation: -2

Replied

@MaximusExploit
cool shut up

  • 0

Hey I'm the first person on Wearedevs.net!

Moon

Moon

vip

Posts: 7441

Threads: 314

Joined: Aug, 2020

Reputation: 80

Replied

@MaximusExploit

He asked for a way that's not using that code, why do you have to be so toxic?

  • 0

Posts: 848

Threads: 72

Joined: May, 2020

Reputation: 9

Replied

@Moon Bruh wth how is he being toxic

  • 0

Don't buy exploits its not worth it your gonna quit anyway

Taking accountability will help you excel in life

Moon

Moon

vip

Posts: 7441

Threads: 314

Joined: Aug, 2020

Reputation: 80

Replied

@ZaphireHacks

"READ THE APPDOMAIN UNHANDLED EXCEPTION, THE LINK I GAVE YOU OMG"

*Impatience 

  • 0

Posts: 848

Threads: 72

Joined: May, 2020

Reputation: 9

Replied

@Moon Bro how is he being impatient lol all he is doing is telling the man to read the documentation. The dude was being a jerk anyways "ThAnKs FoR nOtHiNg".

  • 0

Don't buy exploits its not worth it your gonna quit anyway

Taking accountability will help you excel in life

Posts: 870

Threads: 34

Joined: Aug, 2020

Reputation: 6

Replied

@Moon BRO I GAVE WHAT HE WANTED HOW TF IS THAT TOXIC HE DIDNT EVEN READ IT

  • 0

Posts: 709

Threads: 55

Joined: Feb, 2021

Reputation: 32

Replied

@63568 rip my rep they even deleted thread

  • 0

Why are you here

Next >>>

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )