when i have the following code:
public class Entry { public void Main() { var p = new Class1(); } } public class Class1 { public Class1() { DoSomething(); } private void DoSomething() { try { CallToMethodWhichThrowsAnyException() } catch (Exception ex) { throw new CustomException(ex.Message);
Why can't my CustomException throw and stop execution for debugging in Entry.Main or in the constructor of Class1 (or in my DoSomething method)?
In the immediate window there is only the message A first chance exception of type 'MyLibrary.CustomException' occurred in MyLibrary.dll .
The exception settings for Visual Studio are set so that all CLR exceptions are thrown only when used by the user.
source share