Formatting done according to Netbeans required specifications and added support for rethrowing exceptions