Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Throwable
- {
- private:
- union
- {
- ExceptionOrOtherShitIndicatesError exc;
- SomeValueIndicatesSuccess successCode;
- }
- public:
- bool isError() { // Tells if exception is stored in union };
- auto getError() -> ExceptionOrOtherShitIndicatesError {};
- auto getSuccessCode() -> SomeValueIndicatesSuccess {};
- static ExceptionOrOtherShitIndicatesError constructError() {};
- static SomeValueIndicatesSuccess createSuccessThrow() {};
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement