Class PanicLocationSuffix

java.lang.Object
org.ek9lang.compiler.phase7.support.PanicLocationSuffix
All Implemented Interfaces:
Function<DebugInfo, String>

public final class PanicLocationSuffix extends Object implements Function<DebugInfo, String>
THE " at file:line:col" suffix appended to a Panic message (PanicThrowInstrs), or "" when the location is unknown - hold one and use it. Matches the exact form the old REQUIRE backend produced, so that moving require/for-range message formatting phase-ward leaves runtime message text byte-identical.
  • Constructor Details

    • PanicLocationSuffix

      public PanicLocationSuffix()
  • Method Details

    • apply

      public String apply(DebugInfo debugInfo)
      Specified by:
      apply in interface Function<DebugInfo, String>
      Parameters:
      debugInfo - the source location (may be null or invalid)
      Returns:
      " at file:line:col", or "" when the location is unknown