presto-main/src/main/java/io/prestosql/util/Failures.java/Failures/getErrorLocation
class Failures:    @Nullable
    private static ErrorLocation getErrorLocation(Throwable throwable)
    {
        // TODO: this is a big hack
        if (throwable instanceof ParsingException) {
            ParsingException e = (ParsingException) throwable;
            return new ErrorLocation(e.getLineNumber(), e.getColumnNumber());
        }
        if (throwable instanceof PrestoException) {
            return ((PrestoException) throwable).getLocation()
                    .map(location -> new ErrorLocation(location.getLineNumber(), location.getColumnNumber()))
                    .orElse(null);
        }
        return null;
    }