| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Rpc.Server.Internal.Error
Synopsis
- throwEither :: (Error e, HasCallStack, MonadIO m, Show e, Typeable e) => Either e a -> m a
- throwExceptT :: (Error e, HasCallStack, MonadIO m, Show e, Typeable e) => ExceptT e m a -> m a
- throwGrpcErrorWithMessage :: MonadIO m => GrpcError -> Text -> m a
- data RpcException where
- RpcException :: forall err. (Error err, HasCallStack, Show err, Typeable err) => err -> RpcException
Documentation
throwEither :: (Error e, HasCallStack, MonadIO m, Show e, Typeable e) => Either e a -> m a Source #
throwExceptT :: (Error e, HasCallStack, MonadIO m, Show e, Typeable e) => ExceptT e m a -> m a Source #
throwGrpcErrorWithMessage :: MonadIO m => GrpcError -> Text -> m a Source #
Throw a GrpcException with the given error code and message.
grapesy converts this to proper gRPC trailers before it reaches serverTopLevel.
data RpcException where Source #
Constructors
| RpcException :: forall err. (Error err, HasCallStack, Show err, Typeable err) => err -> RpcException |
Instances
| Exception RpcException Source # | |
Defined in Cardano.Rpc.Server.Internal.Error Methods toException :: RpcException -> SomeException Source # fromException :: SomeException -> Maybe RpcException Source # displayException :: RpcException -> String Source # backtraceDesired :: RpcException -> Bool Source # | |
| Show RpcException Source # | |
Defined in Cardano.Rpc.Server.Internal.Error | |