]> Repositorios git - scryer-prolog.git/commit
ENHANCED: Better error handling if Type is invalid.
authorMarkus Triska <[email protected]>
Sun, 30 Sep 2018 21:36:02 +0000 (23:36 +0200)
committerMarkus Triska <[email protected]>
Sun, 30 Sep 2018 21:36:32 +0000 (23:36 +0200)
commit43f774346703f2b0015ff59c51e8b31a9665cb06
treebcd07a6c5e5170df480af2491f94a790c19a097e
parentaa8fe02b663215c6bdd5e9fdb271742c27aa46c1
ENHANCED: Better error handling if Type is invalid.

Strictly speaking, type is currently not a type, so a domain error is
appropriate if Type is not a valid type. However, there are also other
cases where new types have been introduced in the past, and this
seems a good candidate for a new type. Let us hence use a type error.

Example:

    ?- can_be(listi, [a,b|Ls]).
    %@ ERROR: Type error: `type' expected, found `listi' (an atom)
src/prolog/lib/error.pl