Opened 11 years ago
Closed 5 years ago
#24723 closed Cleanup/optimization (duplicate)
Migration writer errors should be more informative
| Reported by: | James Rivett-Carnac | Owned by: | nobody |
|---|---|---|---|
| Component: | Migrations | Version: | dev |
| Severity: | Normal | Keywords: | Migrations, Exceptions |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
When squashing a set of migrations, the errors should be a bit more informative - such as
giving a file/line number to where the originating offensive code is
An example is ValueError 'Cannot serialize function: lambda'
https://github.com/django/django/blob/1.7.7/django/db/migrations/writer.py#L360
- Note - I couldn't easily figure out what is being done here because the method is a bit long to keep context in my head. I'm not sure if you have access to this information in this method.
Change History (2)
comment:1 by , 11 years ago
| Summary: | Errors while squashing migrations should be more informative → Migration writer errors should be more informative |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
| Version: | 1.7 → master |
comment:2 by , 5 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Currently, ValueErrors raised in FunctionTypeSerializer are the least informative, so improving them should be enough. Closing as a duplicate of #25370.
Note:
See TracTickets
for help on using tickets.
Certainly wouldn't hurt, if it's feasible.