test exceptions and invalid base encoding