Yes, there is a config setting in UmbracoSettings.xml where you can get macros to throw a regular YSOD, the default is just to display an inline text error.
<!-- How Umbraco should handle errors during macro execution. Can be one of the following values:
- inline - show an inline error within the macro but allow the page to continue rendering. Historial Umbraco behaviour.
- silent - Silently suppress the error and do not render the offending macro.
- throw - Throw an exception which can be caught by the global error handler defined in Application_OnError. If no such
error handler is defined then you'll see the Yellow Screen Of Death (YSOD) error page.
Note the error can also be handled by the umbraco.macro.Error event, where you can log/alarm with your own code and change the behaviour per event. -->
<MacroErrors>throw</MacroErrors>
Forms Razor email template - test somehow?
Hi everyone,
I'm working on an razor email template at the moment. Is there a way to test the code without having to send an email all the time?
I only know: If the email comes, the code worked. If not, it didn't work. But I don't know, what didn't work.
All the best, Simeon
Hi Simeon,
If you're working locally on your dev machine, you can use a tool like Papercut SMTP to test outgoing mail
https://github.com/ChangemakerStudios/Papercut-SMTP
If you need to test on a remote machine, you can configure .NET to output mail to a directory on the server:
https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/network/specifiedpickupdirectory-element-network-settings
Hi Simon,
So, there is no way to get a YSOD page like when testing partials or other stuff?
Best, Simeon
Yes, there is a config setting in UmbracoSettings.xml where you can get macros to throw a regular YSOD, the default is just to display an inline text error.
Thank you!
I will try that!
Cool, have a nice weekend! :)
is working on a reply...