Skip to content
Snippets Groups Projects
Commit d4887873 authored by Damian Puente's avatar Damian Puente
Browse files

domain- instead of invalid-arg-error

parent 4a7458d7
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ int multiply(int a, int b) { return a * b; }
int modulo( int a, int b) { return a % b; }
int divide( int a, int b) {
if(b == 0) {
throw std::invalid_argument("Division by 0.");
throw std::domain_error("Division by 0.");
}
return a / b;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment