add accessors for exceptions
add example