std::exception as a base, slightly change semantics of entityRef() function so that it can report line/col.