Skip to content

Runtime and parsing errors carry an empty message #247

Description

@cesarParra

Every runtime failure surfaces as the string Runtime Error: with nothing after it.

Repro

Any of these:

try {
    expression.Evaluator.run('SUM([1, null, 3])', someId);
} catch (Exception e) {
    System.debug(e.getMessage());   // => "Runtime Error: "
}
expression.Evaluator.run('MIN([DATE(2026,1,1), DATE(2026,2,1)])', someId);  // "Runtime Error: "
expression.Evaluator.run('Contacts -> MAP(Cases)', accountId);              // "Runtime Error: "
expression.Evaluator.run('FORMATCURRENCY(100)', someId);                    // "Runtime Error: "

Expected: something naming what failed — the function, the argument, or "no such function".
Actual: Runtime Error: and an empty detail, for every distinct cause.

Notably, a function that does not exist at all and a function that exists but got a bad argument
produce byte-identical messages, so there is no way to tell "I typed the wrong name" from "this
function does not handle this type".

Parse failures are the same shape: Parsing Error: with nothing after it.

Why it matters

Working out why a formula fails currently means bisecting it by hand, one sub-expression at a time.
For an end user editing a formula in a UI there is nothing actionable to show them at all — the
message cannot be surfaced, because it says nothing.

Some errors do carry detail — the SOQL layer's "Didn't understand relationship 'x' in FROM part
of query call" comes through intact — so the machinery exists and it is specifically the
evaluator's own errors that arrive empty.

Environment

Expression 1.52.0.1, Developer Edition scratch org.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions