Added an example to demonstrate how to write your own event listener and how to deal with the exceptions thrown in the process.