#include <iostream>
#include <exception>
using namespace std;

namespace MathError {
	struct DivisionByZero : public std::exception {
		const char* what() const throw() {
			return "DivisionByZero";
		}	
	};
}

float division(float x, float y) {
	if(y == 0.0) {
		throw MathError::DivisionByZero();
	} else {
		return x/y;
	}
}

int main() {
	try {
		cout << "Ratio: " << division(5.0, 0.0) << endl;
	} catch (MathError::DivisionByZero &e) {
		cout << "Error: " << e.what() << endl;
	}
	
	return 0;
}