Throwing An Exception struct Domain_Error { int number; Domain_Error(int d) : number(d) { } }; double square_root(int n) { if (n < 0) { throw Domain_Error(n); } return sqrt(n); }