Nokia Interview Question

Implement a custom error class and raise it under a specific condition.