Skip to content

Enhance -verbose and -dev flags for deep-trace error capturing #1012

@AshokThangavel

Description

@AshokThangavel

Enhanced Error Diagnostics and Persistence via -verbose

Currently, when the PM encounters an error (such as <REGULAR EXPRESSION> or <COMMAND>), it is handled by internal Try/Catch blocks. While the error is reported to the terminal, it is often "swallowed" or summarized.

This leads to a loss of critical diagnostic information:

  • No full stack trace is available for deep debugging.
  • No persistent log is created (unlike npm, which generates a .log file on failure).
  • Application Error Logs remain empty because the error was caught and suppressed by the IPM logic.

Proposed Enhancements

1. Link -verbose to Exception Propagation

When the -verbose (or -v) flag is active, IPM should change its error-handling behavior:

  • Auto-Logging: Instead of just printing a string, it should execute Do ex.Log() to force a snapshot into the System Application Error Log.

Summary of Benefits

  • Streamlined Debugging: Developers can see exactly which line of ObjectScript caused the crash without modifying IPM source code.
  • Improved Traceability: Maintains a history of failed installations and the specific system state at the time of failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions