sample code for handling exceptions

Signed-off-by: Lyndon Michael Bibera <secret.transaction@gmail.com>