浏览代码

Added some documentation about the new "UnkownMetamodellingHierarchy" exception

Yentl Van Tendeloo 8 年之前
父节点
当前提交
ca213e3b1c
共有 1 个文件被更改,包括 13 次插入0 次删除
  1. 13 0
      doc/wrappers.rst

+ 13 - 0
doc/wrappers.rst

@@ -1142,6 +1142,19 @@ Below is a list of all exceptions that the wrappers can raise, together with a s
    Likely, the wrapper is not up to date with the latest Modelverse operations.
    It is difficult to give an example, as this always indicates a bug in the wrapper itself.
 
+.. exception:: UnknownMetamodellingHierarchy
+
+   The requested model and metamodel have no existing relation between them: it is unknown how to make the model conform to the metamodel.
+   This might be because there is no possible relation, or just because there is no relation defined yet.
+
+   Examples:
+
+   * When erroneously trying to interpret a petrinet model as a Class Diagram.
+   
+     >>> alter_context("my_pn", "SimpleClassDiagrams")
+     >>> element_list()
+     UnknownMetamodellingHierarchy("my_pn")
+
 Custom
 ------