[ 
https://issues.apache.org/jira/browse/ISIS-1955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andi Huber resolved ISIS-1955.
------------------------------
    Resolution: Resolved

Demo on how to use a html mailto link for sending the error stacktrace via 
email ...

{code:java}
@DomainService(nature = NatureOfService.DOMAIN)
public class DefaultErrorReportingService implements ErrorReportingService {
        
        @Override
        public Ticket reportError(ErrorDetails errorDetails) {

                String reference = "#0";
                String userMessage = errorDetails.getMainMessage();
                String details = "Apologies!";
                
                val mailTo = MailTo.builder()
                .receiver("[email protected]")
                .subject("[Simple-Module] Unexpected Error ("+reference+")")
                .body(MailTo.mailBodyOf(errorDetails))
                .build();
                
                StackTracePolicy policy = StackTracePolicy.SHOW;
                val ticket = new EmailTicket(mailTo, reference, userMessage, 
details, 
               policy,
               "http://www.randomkittengenerator.com/cats/rotator.php";);
                
                return ticket;
        }
        
}
{code}

> Allow for ErrorReportingService Tickets to render arbitrary HTML
> ----------------------------------------------------------------
>
>                 Key: ISIS-1955
>                 URL: https://issues.apache.org/jira/browse/ISIS-1955
>             Project: Isis
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Andi Huber
>            Assignee: Andi Huber
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> 1. Refactor `org.apache.isis.applib.services.error.Ticket` into an interface.
> 2. Add a method `getMarkup()` that provides the html to be rendered.
> 3. Implement as SimpleTicket providing legacy rendering behavior, but 
> allowing to override the actual html formatting.
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to