public static QueryException fromThrowable ( Throwable cause ) { return ( cause instanceof QueryException ) ? ( QueryException ) cause : new QueryException ( cause ) ; }
Converts a Throwable to a QueryException . If the Throwable is a QueryException it will be passed through unmodified ; otherwise it will be wrapped in a new QueryException .