Skip to content
CryoCryo home
Stdlibtest

error

import std::test::error; · source

TestError

type enum TestError {
    Failed(String);
    Other(String);
}

implement enum TestError {
    message_str(&this) -> Str;
    static failed(message: Str) -> TestError;
    static other(message: Str) -> TestError;
}

Failed is an assertion that did not hold; Other is everything else. It owns its message, so it carries a drop.

Trait implementations

implement trait Drop for enum TestError

implement trait Display for enum TestError