Basically, I am making an Exception class, and I want to be able to easily pass debugging data, for example:
var error = someFunction();
if(error!=0) {
throw MyException("someFunction ended with error state #",error,'.');
}
This will require the class to MyExceptionaccept varargs arguments that can be processed stringstream. I have no idea how exactly I can do this, what I think about it:
template
MyException::MyException() {
std::stringstream ss;
for() {
ss<<;
}
this->message = ss.str();
}
source
share