Better exception implementation.