Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propel1 exception message #9933

Merged
merged 1 commit into from Jan 6, 2014
Merged

Conversation

jaugustin
Copy link
Contributor

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #9932
License MIT
Doc PR none

This add exception message for ModelChoiceList and ModelType when class parameter is not provided or invalid

if (empty($this->class)) {
throw new MissingOptionsException('The "class" parameter is empty, you should provide the model class');
}
throw new InvalidOptionsException(sprintf('The query class "%s" is not found, you should provided the FQCN of the model class', $queryClass));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"provided" => "provide"

@jakzal
Copy link
Contributor

jakzal commented Jan 2, 2014

@jaugustin wouldn't this be picked up by the error handler form the Debug component?

@jaugustin
Copy link
Contributor Author

@jakzal Yes that was the goal, and I just tested it now ;)

@jakzal
Copy link
Contributor

jakzal commented Jan 2, 2014

I mean, Debug component should pick up this kind of error even if you don't throw an exception (and it should propose how to fix the class name).

@jaugustin
Copy link
Contributor Author

@jakzal if you didn't set the class parameter the Debug component will tell you about a Query class not found but that didn't make much sens

fabpot added a commit that referenced this pull request Jan 6, 2014
This PR was merged into the 2.3 branch.

Discussion
----------

Propel1 exception message

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9932
| License       | MIT
| Doc PR        | none

This add exception message for `ModelChoiceList` and `ModelType` when `class` parameter is not provided or invalid

Commits
-------

047492f [Propel1Bridge][ModelChoiceList] add exception message for invalid classes
@fabpot fabpot merged commit 047492f into symfony:2.3 Jan 6, 2014
@jaugustin jaugustin deleted the propel1-exception-message branch January 6, 2014 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants