There's no reason to assume a-priori that this patch creates either naming conventions or semantics (e.g. what is suitable as a boolean expression) that we'd be happy with in a larger context.
Would we be happy borrowing the definition of FOUND from pl/pgsql?
As far as the original problem goes, I wonder whether what you really want isn't a \quit command that lets you specify psql's exit code.
Actually, I'm seeing this as basically an assertion capability and maybe should be named as such