Skip to content

Remove Translating Exception Messages #347

@armanist

Description

@armanist

Description

Currently, Quantum PHP Framework uses translation functions even inside exception messages. This can cause runtime errors if translations are not loaded or available at the time an exception is thrown.

Problem

  • Exceptions may rely on the translation layer, which is not always initialized early in the lifecycle.
  • This creates a circular dependency risk: exception → translator → missing dependency → new exception.
  • It makes debugging harder since localized messages obscure the original error context.

Proposed Solution

  • Stop using translation functions inside exception classes.
  • Use plain English messages directly in exceptions.
  • Keep translation support only for user-facing responses (e.g., validation messages, flash messages, etc.).

Acceptance Criteria

  • All exception messages use static strings, not translation calls.
  • No dependency on the translation system in any exception class.
  • Framework still fully supports translations for UI-level messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions