Opened 9 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 Tim Graham, 9 years ago

Summary: Errors while squashing migrations should be more informativeMigration writer errors should be more informative
Triage Stage: UnreviewedAccepted
Version: 1.7master

Certainly wouldn't hurt, if it's feasible.

comment:2 by Mariusz Felisiak, 4 years ago

Resolution: duplicate
Status: newclosed

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.
Back to Top