Issue161 add exception conversion

PR for #161