Skip to content

Conversation

@johnbillion
Copy link
Member

The following currently fails silently. Let's trigger a PHP warning instead.

Master::add_importer( 'foo', 'Class_That_Does_Not_Exist' );

Copy link
Contributor

@tcrsavage tcrsavage left a comment

Choose a reason for hiding this comment

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

This should probably throw exceptions instead to keep error handling consistent

@johnbillion
Copy link
Member Author

An exception can't be thrown here because there's nothing to catch it.

@tcrsavage
Copy link
Contributor

tcrsavage commented Mar 18, 2019

It'd be up to the developer to catch the exception thrown by Master::add_imporer in that case. If not they get a hard failure which I don't see any problem with personally.

Fieldmanager uses a very similar approach and I found that quite useful as a developer working ontop of the framework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants