Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
af3
kernel
Commits
ad855527
Commit
ad855527
authored
9 years ago
by
Vincent Aravantinos
Browse files
Options
Downloads
Patches
Plain Diff
adds a proper exception for "transformation chain not found"
refs 2352
parent
66412ffa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/TransformationUtils.java
+37
-9
37 additions, 9 deletions
...org/fortiss/tooling/kernel/utils/TransformationUtils.java
with
37 additions
and
9 deletions
org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/TransformationUtils.java
+
37
−
9
View file @
ad855527
...
...
@@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.service.ITransformationService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash:
8B88DE0F53EE7561C069D2660CF31843
* @ConQAT.Rating YELLOW Hash:
17FC59906F6D71B73FF93580315EC8FD
*/
public
final
class
TransformationUtils
{
...
...
@@ -80,14 +80,42 @@ public final class TransformationUtils {
if
(
e
!=
null
)
{
throw
new
ChainTransformationFailedException
(
null
,
null
,
null
,
e
);
}
throw
new
ChainTransformationFailedException
(
null
,
null
,
null
,
null
)
{
/** {@inheritDoc} */
@Override
public
String
getMessage
()
{
return
"No transformation chain found from "
+
sourceElement
+
" to "
+
targetClass
.
getName
();
}
};
throw
new
NoTransformationChainFound
(
sourceElement
,
targetClass
);
}
/** Exception thrown when no transformation chain was found. */
public
static
class
NoTransformationChainFound
extends
ChainTransformationFailedException
{
/** Element which we were trying to transform last. */
private
EObject
sourceElement
;
/** Class which was targeted for that element. */
private
Class
<?>
targetClass
;
/** Constructor. */
public
NoTransformationChainFound
(
EObject
sourceElement
,
Class
<?>
targetClass
)
{
super
(
null
,
null
,
null
,
null
);
this
.
sourceElement
=
sourceElement
;
this
.
targetClass
=
targetClass
;
}
/** {@inheritDoc} */
@Override
public
String
getMessage
()
{
return
"No transformation chain found from "
+
sourceElement
+
" to "
+
targetClass
.
getName
();
}
/** Returns sourceElement. */
public
EObject
getSourceElement
()
{
return
sourceElement
;
}
/** Returns targetClass. */
public
Class
<?>
getTargetClass
()
{
return
targetClass
;
}
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment