Is it possible to write/wrap the exception handling components (try,catch) in different class?
This is about wrapping the exception handling logic in some sort of class. While writing c++ code, many time we need to catch many type/variants of exception depending on what client throw. This lead us to write similar types of code(many times) in catch() clause. In below sample example, I have written the function(), which can throw exception in the many possible form. I wanted to know is it possible to write/wrap such logic in the form of class so that end user would have to write similar types of code at once place?. Does it make any sense or it has any meaning? #include<vector> #include