Using this template you can create a new subclass of Exception with optional detail message.