SpecificationError
scalus.cardano.onchain.SpecificationError
class SpecificationError(msg: String) extends AssertionError
A specification written with scalus.cardano.onchain.plutus.prelude.Spec does not hold. It is thrown off-chain only: a compiled script carries no specification.
So it is no OnchainError, which stands off-chain for a script that fails. A test that expects the script to reject a transaction does not pass because a specification was violated: the script, without the specification, may accept it. It is an AssertionError, as the one Predef.ensuring throws: what is wrong is the code or its caller, not the transaction.
Attributes
- Graph
-
- Supertypes
-
class AssertionErrorclass Errorclass Throwabletrait Serializableclass Objecttrait Matchableclass Any
Members list
In this article