Package android.os

Class RemoteException

    • Constructor Summary

      Constructors 
      Constructor Description
      RemoteException()  
      RemoteException​(java.lang.String message)  
      RemoteException​(java.lang.String message, java.lang.Throwable cause, boolean enableSuppression, boolean writableStackTrace)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.RuntimeException rethrowAsRuntimeException()
      {}
      java.lang.RuntimeException rethrowFromSystemServer()
      Rethrow this exception when we know it came from the system server.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RemoteException

        public RemoteException()
      • RemoteException

        public RemoteException​(java.lang.String message)
      • RemoteException

        public RemoteException​(java.lang.String message,
                               java.lang.Throwable cause,
                               boolean enableSuppression,
                               boolean writableStackTrace)
    • Method Detail

      • rethrowAsRuntimeException

        public java.lang.RuntimeException rethrowAsRuntimeException()
        {}
      • rethrowFromSystemServer

        public java.lang.RuntimeException rethrowFromSystemServer()
        Rethrow this exception when we know it came from the system server. This gives us an opportunity to throw a nice clean DeadSystemException signal to avoid spamming logs with misleading stack traces.

        Apps making calls into the system server may end up persisting internal state or making security decisions based on the perceived success or failure of a call, or any default values returned. For this reason, we want to strongly throw when there was trouble with the transaction.