Sophisticated exception handling  #105

#105