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