[Solved] I have a custom exception I want to throw in one function and catch in another, it isn’t working [closed]

[ad_1]

As pointed out by Yksisarvinen, the new keyword works differently in java and c++.

I removed the new and I am now able to catch the exception.

[ad_2]

solved I have a custom exception I want to throw in one function and catch in another, it isn’t working [closed]