cakephp / cakephp/phinx

More detailed exception information

Open
#809 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
4.5k
Forks
884
PR merge metrics
No merged PRs in 30d

Description

At the moment only the PDO's exception message is displayed when an error occurs. Basically, it will tell you which SQL error occurred, but it will not show any information on which query triggered the error. Depending on the error message, it can be hard to find the query/statement which triggered the error.

It would be a really convenient to display the line in the migration file which triggered the error (or the query which triggered the error).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing where PDO exception messages are surfaced during migration execution, then inspect how the triggering query or migration-file line could be identified. Done means the error retains the original SQL error and also identifies the query or migration-file line that caused it.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.