Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DBIx-Class-Migration CPAN distribution.

Report information
The Basics
Id: 76321
Status: rejected
Priority: 0/
Queue: DBIx-Class-Migration

People
Owner: Nobody in particular
Requestors: frankschwach [...] yahoo.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.020
Fixed in: (no value)



Subject: suggestoin for some error messages
DBIx-Class-Migration-0.020 on Ubuntu 10.10 Hi John, I wanted to report two somewhat cryptic error messages that could be clariified a bit: 1) When a new Schema class is first defined and has no $VERSION set, the error message thrown when issuing the "status" command is unclear: Attribute (schema_version) does not pass the type constraint because: Schema version must be defined at reader DBIx::Class::DeploymentHandler::Dad::schema_version [...] Would be great if presence of $VERSION could be tested first and the error message could then be: Definition of $VERSION missing in Schema class. Please check out the tutorial for setting and maintaining versions for your schema class. 2) If there are errors at compile time in a class using DBIx::Class::Migration::RunScript, the error message is set to: [...] should define an anonymouse sub that takes a schema but it didn't! This is a bit cryptic as it does not point to the real error (the sub is actually defined but it has errors). I would suggest at least to add to the error message a hint that this could be caused by a syntax error in the subroutine, so user should run the script through perl -c To reproduce this, just introduce an arbitrary syntax error in a perl migration script. Cheers, Frank
Hey, I'm going to bring this to DBIC:DH since this needs to be fixed there. Just FYI I have done quite a bit with error messages in the upcoiming DBICM, I'm sending to cpan soon. Sorry for the slow response John On Thu Apr 05 05:14:48 2012, fschwach wrote: Show quoted text
> DBIx-Class-Migration-0.020 on Ubuntu 10.10 > > Hi John, > > I wanted to report two somewhat cryptic error messages that could be > clariified a bit: > > 1) > When a new Schema class is first defined and has no $VERSION set, the > error message thrown when issuing the "status" command is unclear: > > Attribute (schema_version) does not pass the type constraint because: > Schema version must be defined at reader > DBIx::Class::DeploymentHandler::Dad::schema_version [...] > > Would be great if presence of $VERSION could be tested first and the > error message could then be: > Definition of $VERSION missing in Schema class. Please check out the > tutorial for setting and maintaining versions for your schema class. > > 2) > If there are errors at compile time in a class using > DBIx::Class::Migration::RunScript, the error message is set to: > > [...] should define an anonymouse sub that takes a schema but it didn't! > > This is a bit cryptic as it does not point to the real error (the sub is > actually defined but it has errors). > I would suggest at least to add to the error message a hint that this > could be caused by a syntax error in the subroutine, so user should run > the script through perl -c > To reproduce this, just introduce an arbitrary syntax error in a perl > migration script. > > Cheers, > > Frank