}
public static OtpException convertOtpAccessException(Exception ex) {
Assert.notNull(ex, "Exception must not be null");
if (ex instanceof IOException) {
return new OtpIOException((IOException) ex);
}
if (ex instanceof OtpAuthException) {
return new org.springframework.erlang.OtpAuthException((OtpAuthException) ex);
}
//fallback