Class RichErrorMessages

java.lang.Object
org.ek9lang.compiler.common.RichErrorMessages

public final class RichErrorMessages extends Object
Provides rich error messages for AI-assisted development. These detailed messages are appended to error output when error level E3 is enabled, helping AI assistants understand and resolve EK9 compilation errors more effectively.

This class is a pure lookup - it contains no state. The decision of whether to based on the per-compilation error level from CompilerFlags.

Each error code has a rich message containing:

  • COMMON CAUSES - typical reasons for this error
  • TO FIX - suggested remediation steps
  • DISTINCTION - clarification from similar error codes
  • Method Details

    • getRichMessage

      public static String getRichMessage(String errorCode)
      Get the rich message for an error code.
      Parameters:
      errorCode - The error code (e.g., "E50001")
      Returns:
      The rich message, or null if not found