Bug 431998 - [Profiles] Factor out exception handling in PackageOperations::StereotypeCopier
Summary: [Profiles] Factor out exception handling in PackageOperations::StereotypeCopier
Status: VERIFIED FIXED
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: 5.0.0   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: M7   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks: 408491
  Show dependency tree
 
Reported: 2014-04-04 06:54 EDT by Christian Damus CLA
Modified: 2014-04-07 10:03 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Damus CLA 2014-04-04 06:54:49 EDT
I am reusing the (internal API) PackageOperation::StereotypeCopier to implement a "profile switch" function in Papyrus (bug 408491).  Instead of just logging exceptions such as the IllegalStateExceptions that occur on failure to find a matching class/property in the new profile definition, I want to record Diagnostics to present to the user.

To that end, it would be helpful to factor out the logging of exceptions in the catch blocks of the StereotypeCopier's copyAttribute/copyContainment/copyReference methods into a handleException(Exception) method that I can override.  Currently, I have to copy the entirety of these operations to effect this override.

This should be API-safe post M6 because the API in question is internal.
Comment 1 Christian Damus CLA 2014-04-04 06:55:45 EDT
I can take care of this, as I'm the one that needs it. ;-)
Comment 2 Christian Damus CLA 2014-04-07 08:15:54 EDT
Fixed in git commit cdfe9bc.
Comment 3 Kenn Hussey CLA 2014-04-07 09:34:07 EDT
The changes will be available in the next integration build.
Comment 4 Kenn Hussey CLA 2014-04-07 10:03:34 EDT
An integration build containing the changes is now available.