public static Exceptions.StorageException toStorageException(Status rpcStatus, Throwable exception)
Converts a c.g.rpc.Status into a StorageException, if possible. Examines the embedded
StorageError, and potentially returns a StreamFinalizedException or SchemaMismatchedException (both derive from StorageException). If there is no StorageError, or
the StorageError is a different error it will return NULL.
public static Exceptions.StorageException toStorageException(Throwable exception)
Converts a Throwable into a StorageException, if possible. Examines the embedded error message,
and potentially returns a StreamFinalizedException or SchemaMismatchedException
(both derive from StorageException). If there is no StorageError, or the StorageError is a
different error it will return NULL.