Opened 10 years ago
Closed 4 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 , 10 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 , 4 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Currently, ValueError
s 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.