public Class<? extends WebDriverException> getExceptionType(String message) {
        for (Map.Entry<Integer, String> entry : statusToState.entrySet()) {
            if (message.contains(entry.getValue())) {
                return getExceptionType(entry.getKey());
            }
        }
        return null;
    }
public Class < ? extends WebDriverException > getExceptionType ( String message ) { for ( Map . Entry < Integer , String > entry : statusToState . entrySet ( ) ) { if ( message . contains ( entry . getValue ( ) ) ) { return getExceptionType ( entry . getKey ( ) ) ; } } return null ; }
Returns the exception type that corresponds to the given {@code message}or {@code null} if
there are no matching mobile exceptions.

@param message message An error message returned by Appium server
@return The exception type that corresponds to the provided error message or {@code null} if
there are no matching mobile exceptions.