When a function returns a class that extend this, one should call
isError() on that class before performing any further
actions. If an error exists, any use of that class, aside from those
functions in WithDiagnostics, is invalid and will result in an
Exception.