Praman — Agent-First SAP UI5 Test Automation Plugin - v1.2.0
    Preparing search index...

    Class PluginError

    Error subclass for plugin lifecycle failures.

    const error = new PluginError({
    message: 'Plugin failed to load',
    attempted: 'Load plugin',
    pluginName: 'my-plugin',
    });

    Load failed — plugin module could not be imported

    Init failed — plugin setup() threw an error

    Incompatible version — plugin requires a different Praman version

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new PluginError instance.

      Parameters

      • options: PluginErrorOptions

        Plugin error construction options including the required plugin name and optional version for diagnostic context.

      Returns PluginError

      import { PluginError } from '#core/errors/plugin-error.js';

      const error = new PluginError({
      message: 'Plugin incompatible with Praman v1.0',
      attempted: 'Load plugin my-custom-auth',
      pluginName: 'my-custom-auth',
      pluginVersion: '0.5.0',
      code: 'ERR_PLUGIN_INCOMPATIBLE',
      });

    Properties

    attempted: string
    code: ErrorCode
    details: Readonly<Record<string, unknown>>
    pluginName: string
    pluginVersion: string | undefined
    retryable: boolean
    severity: "error" | "info" | "warning"
    suggestions: readonly string[]
    timestamp: string

    Methods

    • Returns AI-agent-friendly context with plugin-specific diagnostic fields.

      Returns AIErrorContext & { pluginName: string; pluginVersion: string | undefined }

      Base AI context extended with plugin name and version details.

      const ctx = error.toAIContext();
      // LLM can use ctx.pluginName to locate the plugin package
      // and ctx.pluginVersion to check compatibility requirements
    • Serializes this error to a JSON-safe object with plugin-specific fields.

      Returns SerializedPramanError & {
          pluginName: string;
          pluginVersion: string | undefined;
      }

      Base serialization extended with pluginName and pluginVersion.

      const json = error.toJSON();
      console.log(json.pluginName); // 'my-custom-auth'
      console.log(json.pluginVersion); // '0.5.0'
    • Formats the error for human-readable console output.

      Returns string

      Multi-line formatted string with all diagnostic sections.

      console.error(error.toUserMessage());