Browse Source

Finished documentation of wrapper exceptions

Yentl Van Tendeloo 7 years ago
parent
commit
00adc6f85a
2 changed files with 13 additions and 19 deletions
  1. 13 12
      doc/wrappers.rst
  2. 0 7
      wrappers/classes/modelverse.xml

+ 13 - 12
doc/wrappers.rst

@@ -1661,29 +1661,30 @@ For each exception, its superclasses are also indicated after the colon.
      >>> admin_promote("other_user")
      AdminPermissionDenied()
 
-.. exception:: InterfaceMismatch : ModelverseException
-
-   Examples:
-
-   * 
-
-     >>>
-
 .. exception:: UnknownMetamodellingHierarchy : ModelverseException
 
+   The requested metamodelling hierarchy could not be resolved.
+   This is likely because no typing relation could be found between the specified model and metamodel, or if this typing relation is only a partial mapping that cannot be automatically resolved.
+   Note that this exception should never occur when opening the model using *formalisms/Bottom*.
+
    Examples:
 
-   * 
+   * When opening an arbitrary model as a SimpleClassDiagrams model.
 
-     >>>
+     >>> alter_context("models/my_pn", "formalisms/SimpleClassDiagrams")
+     >>> element_list("models/my_pn")
+     UnknownMetamodellingHierarchy()
 
 .. exception:: NotAnAssociation : ModelverseException
 
+   The requested element is not an association or link, although it should be.
+
    Examples:
 
-   * 
+   * When instantiating an association with a type that is not an association.
 
-     >>>
+     >>> instantiate("models/my_pn", "Place", edge=("p1", "p2"))
+     NotAnAssociation
 
 SCCD
 ----

+ 0 - 7
wrappers/classes/modelverse.xml

@@ -1609,13 +1609,6 @@
                         </raise>
                     </transition>
 
-                    <transition cond="self.expect_response_partial('Incorrect format: ', pop=False)" target="../wait_for_action/history">
-                        <raise event="exception">
-                            <parameter expr="'InterfaceMismatch'"/>
-                            <parameter expr="self.split_response(self.responses.pop(0))[0]"/>
-                        </raise>
-                    </transition>
-
                     <transition cond="self.expect_response_partial('Element not found: ', pop=False)" target="../wait_for_action/history">
                         <raise event="exception">
                             <parameter expr="'UnknownElement'"/>