{-# OPTIONS_GHC -Wno-orphans #-}
module Lorentz.Errors.Common () where
import Fmt (Buildable(..))
import Lorentz.Errors
type instance ErrorArg "senderIsNotAdmin" = UnitErrorArg
instance Buildable (CustomError "senderIsNotAdmin") where
build :: CustomError "senderIsNotAdmin" -> Builder
build (CustomError Label "senderIsNotAdmin"
_ (_, ())) =
Builder
"This operation can be executed only by admin, but is invoked by \
\someone else"
instance CustomErrorHasDoc "senderIsNotAdmin" where
customErrClass :: ErrorClass
customErrClass = ErrorClass
ErrClassActionException
customErrDocMdCause :: Builder
customErrDocMdCause =
Builder
"Entrypoint executed not by its administrator."