I have enum for errors for instance:
And when I want to throw in some function this way:Code:enum socket_errors { ERR_UNRESOLVABLE = SOCKET_ERRORS, ERR_INTERNAL, ERR_SOCK_CREATION, ERR_BIND_FAILED };
I cannot catch this way in some other function that is calling previous function:Code:void prevfunc() { //stuff// throw ERR_SOCK_CREATION; return; }
What would be the right way to catch it? What should I look for?Code:try { prevfunc(); } catch (unsigned int) { }