It is a LTI plugin so they will be messages when a external application passes on the request information to my plugin. This plugin handles authentication a validation of the information received
One of the messages p.e, is 'LTI context not available but needed. Proceess aborted'
In fact, I think it doesn't matter the type of message. In general I would like to display a personalized message. Now I'm using echo and exit and redirect.
When I interpret the text from your reply to x00, I would say the errortype would be 'validation'. Let's see if Garden has a special errortype for that. Please add a Wiki page when you've found what you're looking for, explaining how to use, etc. :-)
x00Don't PM about development, I'm not currently taking on clientsMVP
Well it matter in terms of style, status codes etc. Whether true error, just relaying information.
if you just want a bonk/debug message then use
throw new ErrorException('Error Message.');
A useful method that I have used for permission errors is
$Message = T('You do not have permission to bla, bla, bla');
Gdn::Locale()->SetTranslation('PermissionErrorMessage',$Message));
throw new Exception($Message,401);
However there isn't a general error message page other than Bonk, and debug mode (which isn't ideal to show) If you include a view like so, it will display roughly equivalent.
Eventually, I have used the PermissionErrorMessage.
For one case, which displayed more information, I have used a simple echo because I wanted to add more views to the plugin.
Comments
what type of error?
validation, notfound, denied, etc
Don't PM about development, I'm not currently taking on clients.
grep is your friend.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •It is a LTI plugin so they will be messages when a external application passes on the request information to my plugin. This plugin handles authentication a validation of the information received One of the messages p.e, is 'LTI context not available but needed. Proceess aborted' In fact, I think it doesn't matter the type of message. In general I would like to display a personalized message. Now I'm using echo and exit and redirect.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •When I interpret the text from your reply to x00, I would say the errortype would be 'validation'. Let's see if Garden has a special errortype for that. Please add a Wiki page when you've found what you're looking for, explaining how to use, etc. :-)
What to do if I get a Bonk Error?
Vanilla Wiki : Join and help edit our Wiki! | View all Vanilla issues on GitHub | Report a new Vanilla issue on GitHub
Deploying a new Forum and adding a Theme | Give thanks to the Vanilla Developers!
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Well it matter in terms of style, status codes etc. Whether true error, just relaying information.
if you just want a bonk/debug message then use
A useful method that I have used for permission errors is
However there isn't a general error message page other than Bonk, and debug mode (which isn't ideal to show) If you include a view like so, it will display roughly equivalent.
If you want those inline red validation messages, a bit like flash
You can also use inform messages for more low key notification.
Don't PM about development, I'm not currently taking on clients.
grep is your friend.
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •Eventually, I have used the PermissionErrorMessage. For one case, which displayed more information, I have used a simple echo because I wanted to add more views to the plugin.
Thank you for your help.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •