eMoflon / emoflon-neo

A Neo4j-based implementation of eMoflon
Eclipse Public License 2.0
6 stars 2 forks source link

Introduce subclasses for FlattenerException #268

Open anthonyanjorin opened 4 years ago

anthonyanjorin commented 4 years ago

FlattenerException is currently problematic as it has a pool of attributes of which only a subset is assigned values, depending on how the class is instantiated. This is bad style as clients of the class never know what they can access and what not, e.g., when trying to report the exception in the editor.

A fix would be to introduce and use subclasses, and get rid of the current “errorType”. This way catch clauses could be used to handle each expected subtype of flattening error...