Hi Erin,
Not too sure of the answer to that one unfortunately as I have only ever made a couple of exceptionally easy plug-ins but (and I could be wrong on this one) it seems a little weird to want that sort of functionality as it really is up to the programmer to ensure that they have supplied all the correct details for the plug-in tag I would have thought.
It would be a bit like expecting a whole page of html to self validate itself.
Sorry I couldn’t be much help here but just thought that it was a bit of a weird request. If I am on the completely wrong track then please do feel free to tell me to shut-up!! 😊
Hope you get whatever it is you are trying to do sorted though.
Best wishes,
Mark
I was always taught that every function should return a status or set an error so that the caller could find out what was wrong.
Or even if the error was only displayed under debug conditions of some sort.
That being said, I am new to PHP, so maybe this isn’t done this way.
I was just thinking about if I was calling a plugin or module and it wasn’t working, how would I figure out what was going wrong. Most people who call them won’t be programmers and feel comfortable looking at source to figure things out. A standardized way to get the status or error message would be handy. That is just MHO, of course.
I am not sure I will release my plugins to the public, so this isn’t super relative, but I thought about it, so I thought I’d ask about it. No biggie either way.
Thanks
Plugins and modules shouldn’t ever output errors to the screen that users might see if a problem occurred. See the example of validating values before use, which uses $TMPL->log_item() to write a descriptive error to the Tempate Parsing Log, which Super Admins can enable and see when needing to troubleshoot.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.