[ 
https://issues.apache.org/jira/browse/ISIS-1108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14377532#comment-14377532
 ] 

ASF subversion and git services commented on ISIS-1108:
-------------------------------------------------------

Commit 9bc0f197d0f2e520cd0204f5f25220b6bb339014 in isis's branch 
refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=9bc0f19 ]

ISIS-1108: TranslatableException; ExceptionRecognizerAbstract checks if 
exception implements TranslatableException; overloads of informUser etc for 
DomainObjectContainer

In addition:
- RecoverableException, NonRecoverableException, ApplicationException can 
specify TranslatableString message in constructor
- ExceptionRecognizerTranslate JUnit rule ensures that any thrown exceptions 
that implement TranslatableException are exercised (calls 
getTranslatedMessage() on them).
- ExceptionRecognizerComposite injected services into sub recognizers
- ditto DomainObjectContainerDefault
- IntegrationTestAbstract now specifies the ExceptionRecognizerTranslate rule 
by default.
- TranslatableString exposes its getPattern so that TranslatableExceptions have 
a meaningful getMessage() if only a TranslatableString message was provided.


> Allow informUser, warnUser, raiseError and also exception messages to be 
> translated.
> ------------------------------------------------------------------------------------
>
>                 Key: ISIS-1108
>                 URL: https://issues.apache.org/jira/browse/ISIS-1108
>             Project: Isis
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: core-1.8.0
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>            Priority: Minor
>             Fix For: 1.9.0
>
>
> Probably by having overloaded methods etc that return TranslatableString 
> instead of just String, eg
> public class RecoverableException {
>     public RecoverableException(TranslatableString tr) { ... }
>     public TranslatableString getTranslatableMessage() { ... }
> }
> ~~~~
> and
> public interface DomainObjectContainer {
>     public void informUser(TranslatableString tr);
>     ...
> }
> etc



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to