Add custom CharonError exception type

also small bugfix