diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/DataTreeBuilderHelper.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/DataTreeBuilderHelper.java
index 18c7e86..8f7a11b 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/DataTreeBuilderHelper.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/DataTreeBuilderHelper.java
@@ -427,9 +427,9 @@
                     obj = getAttributeOfObject(
                             parentNodeInfo.getYangObject(), name);
                 } catch (NoSuchMethodException e) {
-                    throw new ModelConvertorException(
+                    throw new ModelConverterException(
                             "Not processable case node with augment in " +
-                                    "data tree");
+                                    "data tree", e);
                 }
                 parentNodeInfo = new DataTreeNodeInfo();
                 parentNodeInfo.setYangObject(obj);
@@ -460,7 +460,7 @@
                 nodeObj = processAugmentNode(curNode, parentNodeInfo);
                 break;
             default:
-                throw new ModelConvertorException(
+                throw new ModelConverterException(
                         "Non processable schema node has arrived for adding " +
                                 "it in data tree");
         }
@@ -631,9 +631,9 @@
                 return getAttributeOfObject(
                         parentNodeInfo.getYangObject(), name);
             } catch (NoSuchMethodException e) {
-                throw new ModelConvertorException(
+                throw new ModelConverterException(
                         "Not processable case node with augment in " +
-                                "data tree");
+                                "data tree", e);
             }
         }
 
@@ -658,7 +658,7 @@
                 return childObj;
             }
         } catch (ClassNotFoundException | NoSuchMethodException e) {
-            throw new ModelConvertorException(e);
+            throw new ModelConverterException(e);
         }
         return null;
     }
@@ -702,7 +702,7 @@
         try {
             return getAttributeOfObject(parentObj, nodeJavaName);
         } catch (NoSuchMethodException e) {
-            throw new ModelConvertorException(e);
+            throw new ModelConverterException(e);
         }
     }
 
@@ -764,7 +764,7 @@
                         leafType = getAttributeOfObject(parentObj,
                                                         getJavaName(yangLeaf));
                     } catch (NoSuchMethodException e) {
-                        throw new ModelConvertorException(e);
+                        throw new ModelConverterException(e);
                     }
                     Object obj = getLeafObject(yangNode, yangLeaf, parentObj,
                                                leafType, false);
@@ -829,7 +829,7 @@
             obj = (List<Object>) getAttributeOfObject(parentObj,
                                                       getJavaName(leafList));
         } catch (NoSuchMethodException e) {
-            throw new ModelConvertorException(e);
+            throw new ModelConverterException(e);
         }
         if (obj != null) {
             Set<Object> objects = getLeafListObject(yangNode, leafList,
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/DefaultDataTreeBuilder.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/DefaultDataTreeBuilder.java
index 59aac5a..7953ee5 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/DefaultDataTreeBuilder.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/DefaultDataTreeBuilder.java
@@ -126,7 +126,7 @@
         }
 
         if (converter.isMoIdWithLeaf() && nonEmpty(modelObjects)) {
-            throw new ModelConvertorException(
+            throw new ModelConverterException(
                     "invalid module object data when model object identifier" +
                             " contains leaf node, no object should be added to" +
                             " model object list." + modelData);
@@ -155,7 +155,7 @@
                     processDataNodeConversion((YangNode) curNode, helper,
                                               rscData, modObj);
                 } else {
-                    throw new ModelConvertorException(
+                    throw new ModelConverterException(
                             "failed to convert model object in data node" +
                                     modObj);
                 }
@@ -200,7 +200,7 @@
                 }
                 break;
             default:
-                throw new ModelConvertorException(
+                throw new ModelConverterException(
                         "Non processable schema node has arrived for adding " +
                                 "it in data tree");
         }
@@ -645,7 +645,7 @@
                     }
                 }
             } catch (NoSuchMethodException e) {
-                throw new ModelConvertorException(e);
+                throw new ModelConverterException(e);
             }
         }
     }
@@ -682,7 +682,7 @@
                     addDataNode(builder, rscData);
                 }
             } catch (NoSuchMethodException e) {
-                throw new ModelConvertorException(
+                throw new ModelConverterException(
                         "Failed to create data node for leaf "
                                 + leaf.getName());
             }
@@ -864,7 +864,7 @@
                 }
                 break;
             default:
-                throw new ModelConvertorException(
+                throw new ModelConverterException(
                         "Non processable schema node has arrived for adding " +
                                 "it in data tree");
         }
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModIdToRscIdConverter.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModIdToRscIdConverter.java
index d68d0c0..43612ee 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModIdToRscIdConverter.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModIdToRscIdConverter.java
@@ -248,11 +248,11 @@
                         }
                     }
                 } else {
-                    throw new ModelConvertorException("invalid model object id." + id);
+                    throw new ModelConverterException("invalid model object id." + id);
                 }
                 preNode = curNode;
             } catch (Exception e) {
-                throw new ModelConvertorException("Encountered an Exception processing " + path, e);
+                throw new ModelConverterException("Encountered an Exception processing " + path, e);
             }
         }
         if (!isMoIdWithLeaf) {
@@ -281,7 +281,7 @@
             }
         }
         if (curNode == null) {
-            throw new ModelConvertorException("invalid model object id." + id);
+            throw new ModelConverterException("invalid model object id." + id);
         }
         isMoIdWithLeaf = true;
         if (curNode instanceof YangLeaf) {
@@ -344,7 +344,7 @@
         try {
             return getAttributeOfObject(keys, getCamelCase(keyName, null));
         } catch (NoSuchMethodException e) {
-            throw new ModelConvertorException("invalid key value in model id for list" +
+            throw new ModelConverterException("invalid key value in model id for list" +
                                                       "." + keys.getClass().getName());
         }
     }
@@ -471,7 +471,7 @@
             }
         }
         if (leaf == null) {
-            throw new ModelConvertorException(
+            throw new ModelConverterException(
                     "The specified key " + key + " is not present in the " +
                             "YANG schema node.");
         }
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModelConverterException.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModelConverterException.java
new file mode 100644
index 0000000..1c33a08
--- /dev/null
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModelConverterException.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yang.runtime.impl;
+
+/**
+ * Represents exception that needs to be handled by model converter.
+ */
+// extending ModelConvertorException for backward compatibility,
+// directly extend RuntimeException when removing Exception class with typo
+@SuppressWarnings("deprecation")
+class ModelConverterException
+    extends ModelConvertorException {
+
+    private static final long serialVersionUID = 4586537426529302237L;
+
+    /**
+     * Creates  model converter exception with an exception message.
+     *
+     * @param exceptionMessage message with which exception must be thrown
+     */
+    ModelConverterException(String exceptionMessage) {
+        super(exceptionMessage);
+    }
+
+    /**
+     * Creates  model converter exception with an exception message and cause.
+     *
+     * @param exceptionMessage message with which exception must be thrown
+     * @param cause cause of the exception
+     */
+    ModelConverterException(String exceptionMessage, Throwable cause) {
+        super(exceptionMessage, cause);
+    }
+
+    /**
+     * Creates  model converter exception with the cause for it.
+     *
+     * @param cause cause of the exception
+     */
+    ModelConverterException(Throwable cause) {
+        super(cause);
+    }
+}
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModelConverterUtil.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModelConverterUtil.java
index 4b5906f..2ba6e78 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModelConverterUtil.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModelConverterUtil.java
@@ -127,7 +127,7 @@
             getterMethod = nodeClass.getDeclaredMethod(fieldName);
             return getterMethod.invoke(nodeObj);
         } catch (InvocationTargetException | IllegalAccessException e) {
-            throw new ModelConvertorException(e);
+            throw new ModelConverterException(e);
         }
     }
 
@@ -148,7 +148,7 @@
             getterMethod = nodeClass.getDeclaredMethod(fieldName);
             return getterMethod.invoke(nodeObj);
         } catch (InvocationTargetException | IllegalAccessException e) {
-            throw new ModelConvertorException(e);
+            throw new ModelConverterException(e);
         }
     }
 
@@ -169,7 +169,7 @@
             return getterMethod.invoke(childClass);
         } catch (InvocationTargetException | NoSuchMethodException |
                 IllegalAccessException e) {
-            throw new ModelConvertorException(e);
+            throw new ModelConverterException(e);
         }
     }
 
@@ -183,7 +183,7 @@
         Class<?>[] interfaces = obj.getClass().getInterfaces();
         if (interfaces.length > ONE) {
             // TODO: Need to handle when impl class has more than one interface.
-            throw new ModelConvertorException("Implementation class having more than one" +
+            throw new ModelConverterException("Implementation class having more than one" +
                                                       " interface is not handled");
         }
         return interfaces[0];
@@ -248,7 +248,7 @@
             return (boolean) getterMethod.invoke(nodeObj, value);
         } catch (IllegalAccessException | InvocationTargetException |
                 ClassNotFoundException | NoSuchMethodException e) {
-            throw new ModelConvertorException(e);
+            throw new ModelConverterException(e);
         }
     }
 
@@ -268,7 +268,7 @@
                                  YangType dataType) {
 
         if (fieldObj == null) {
-            throw new ModelConvertorException("Value of " + holder.getName()
+            throw new ModelConverterException("Value of " + holder.getName()
                                                       + " is null");
         }
 
@@ -318,7 +318,7 @@
                 return ((LeafSchemaContext) leaf).fromString(val);
 
             default:
-                throw new ModelConvertorException(
+                throw new ModelConverterException(
                         "Unsupported data type. Cannot be processed.");
         }
     }
@@ -350,7 +350,7 @@
             return String.valueOf(getterMethod.invoke(null, fieldObj));
         } catch (ClassNotFoundException | NoSuchMethodException |
                 InvocationTargetException | IllegalAccessException e) {
-            throw new ModelConvertorException(e);
+            throw new ModelConverterException(e);
         }
     }
 
@@ -367,7 +367,7 @@
 
         YangIdentity id = getDerivedIdentity(fieldObj, ir);
         if (id == null) {
-            throw new ModelConvertorException("Value for identity is invalid");
+            throw new ModelConverterException("Value for identity is invalid");
         }
         String idName = id.getJavaClassNameOrBuiltInType();
         String idPkg = id.getJavaPackage() + PERIOD + getCapitalCase(idName);
@@ -382,7 +382,7 @@
             return String.valueOf(method.invoke(fieldObj)).trim();
         } catch (ClassNotFoundException | NoSuchMethodException |
                 InvocationTargetException | IllegalAccessException e) {
-            throw new ModelConvertorException(e);
+            throw new ModelConverterException(e);
         }
     }
 
@@ -522,7 +522,7 @@
                 return getNameWithOutSpecialChar(
                         mil.leafIdentifier().toString().toLowerCase());
             default:
-                throw new ModelConvertorException("leaf/leaf-list can't be at this " +
+                throw new ModelConverterException("leaf/leaf-list can't be at this " +
                                                           "position");
         }
     }
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModelConvertorException.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModelConvertorException.java
index c5d3eb4..2d15937 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModelConvertorException.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/ModelConvertorException.java
@@ -18,7 +18,10 @@
 
 /**
  * Represents exception that needs to be handled by model converter.
+ *
+ * @deprecated use {@link ModelConverterException} instead.
  */
+@Deprecated
 class ModelConvertorException extends RuntimeException {
 
     /**
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobHandlerFactory.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobHandlerFactory.java
index 60e2920..a3f9a16 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobHandlerFactory.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobHandlerFactory.java
@@ -61,13 +61,13 @@
      *
      * @param type data node type
      * @return handler to create the object
-     * @throws ModelConvertorException if the data node type is not supported in YOB
+     * @throws ModelConverterException if the data node type is not supported in YOB
      */
     YobHandler getYobHandlerForContext(DataNode.Type type) {
         YobHandler yobHandler = HANDLER_MAP.get(type);
         if (yobHandler == null) {
             log.error(E_DATA_NODE_TYPE_IS_NOT_SUPPORT);
-            throw new ModelConvertorException(E_DATA_NODE_TYPE_IS_NOT_SUPPORT);
+            throw new ModelConverterException(E_DATA_NODE_TYPE_IS_NOT_SUPPORT);
         }
         return yobHandler;
     }
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobLeafListNodeHandler.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobLeafListNodeHandler.java
index 5d21258..04d2d51 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobLeafListNodeHandler.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobLeafListNodeHandler.java
@@ -110,7 +110,7 @@
         } catch (NoSuchMethodException | InvocationTargetException |
                 IllegalAccessException | NoSuchFieldException e) {
             log.error(L_FAIL_TO_INVOKE_METHOD, parentClass.getName());
-            throw new ModelConvertorException(E_FAIL_TO_INVOKE_METHOD + parentClass
+            throw new ModelConverterException(E_FAIL_TO_INVOKE_METHOD + parentClass
                     .getName());
         }
     }
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobLeafNodeHandler.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobLeafNodeHandler.java
index 76e7d40..51eea48 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobLeafNodeHandler.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobLeafNodeHandler.java
@@ -91,7 +91,7 @@
         } catch (NoSuchMethodException | InvocationTargetException |
                 IllegalAccessException | NoSuchFieldException e) {
             log.error(L_FAIL_TO_INVOKE_METHOD, parentClass.getName());
-            throw new ModelConvertorException(E_FAIL_TO_INVOKE_METHOD + parentClass
+            throw new ModelConverterException(E_FAIL_TO_INVOKE_METHOD + parentClass
                     .getName());
         }
     }
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobUtils.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobUtils.java
index ca8284a..7185240 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobUtils.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobUtils.java
@@ -385,7 +385,7 @@
             }
             Class<?> moduleClass = reg.getRegisteredClass(parent);
             if (moduleClass == null) {
-                throw new ModelConvertorException(E_FAIL_TO_LOAD_CLASS + parent
+                throw new ModelConverterException(E_FAIL_TO_LOAD_CLASS + parent
                         .getJavaClassNameOrBuiltInType());
             }
             return moduleClass.getClassLoader();
@@ -487,7 +487,7 @@
         derivedId = getDerivedIdentity(leafValue.toString(), identityRef
                 .getReferredIdentity());
         if (derivedId == null) {
-            throw new ModelConvertorException(E_INVALID_IDENTITY_DATA +
+            throw new ModelConverterException(E_INVALID_IDENTITY_DATA +
                                                       leafValue.toString());
         }
         qualifiedClassName = derivedId.getJavaPackage() + PERIOD +
@@ -586,7 +586,7 @@
             if (intf != null) {
                 leafId = intf.getName() + ENUM_LEAF_IDENTIFIER;
             } else {
-                throw new ModelConvertorException(E_FAIL_TO_LOAD_LEAF_IDENTIFIER_CLASS);
+                throw new ModelConverterException(E_FAIL_TO_LOAD_LEAF_IDENTIFIER_CLASS);
             }
 
             Class<Enum> leafIdentifier =
@@ -598,7 +598,7 @@
                 }
             }
         } catch (ClassNotFoundException e) {
-            throw new ModelConvertorException(E_FAIL_TO_LOAD_CLASS);
+            throw new ModelConverterException(E_FAIL_TO_LOAD_CLASS);
         }
         return null;
     }
@@ -614,7 +614,7 @@
         try {
             return loader.loadClass(name);
         } catch (ClassNotFoundException e) {
-            throw new ModelConvertorException(E_FAIL_TO_LOAD_CLASS + name);
+            throw new ModelConverterException(E_FAIL_TO_LOAD_CLASS + name);
         }
     }
 
@@ -631,14 +631,14 @@
             return defaultClass.newInstance();
         } catch (ClassNotFoundException e) {
             log.error(L_FAIL_TO_LOAD_CLASS, name);
-            throw new ModelConvertorException(E_FAIL_TO_LOAD_CLASS + name);
+            throw new ModelConverterException(E_FAIL_TO_LOAD_CLASS + name);
         } catch (NullPointerException e) {
             log.error(L_REFLECTION_FAIL_TO_CREATE_OBJ, name);
-            throw new ModelConvertorException(E_REFLECTION_FAIL_TO_CREATE_OBJ +
+            throw new ModelConverterException(E_REFLECTION_FAIL_TO_CREATE_OBJ +
                                                       name);
         } catch (InstantiationException | IllegalAccessException e) {
             log.error(L_FAIL_TO_CREATE_OBJ, name);
-            throw new ModelConvertorException(E_FAIL_TO_CREATE_OBJ + name);
+            throw new ModelConverterException(E_FAIL_TO_CREATE_OBJ + name);
         }
     }
 
@@ -737,20 +737,20 @@
                         midb = midb.addChild(listClass, keyObj);
                     }
                 } catch (NoSuchMethodException e) {
-                    throw new ModelConvertorException(
+                    throw new ModelConverterException(
                             "Failed to load setter method for " +
                                     javaName + " in key class"
                                     + keyClassName);
                 } catch (InvocationTargetException e) {
-                    throw new ModelConvertorException(
+                    throw new ModelConverterException(
                             "Failed to invoke setter method for " +
                                     javaName + " in key class"
                                     + keyClassName);
                 } catch (ClassNotFoundException e) {
-                    throw new ModelConvertorException("Failed to load key class"
+                    throw new ModelConverterException("Failed to load key class"
                                                               + keyClassName);
                 } catch (IllegalAccessException | InstantiationException e) {
-                    throw new ModelConvertorException("Failed Instantiation of key class"
+                    throw new ModelConverterException("Failed Instantiation of key class"
                                                               + keyClassName);
                 } catch (NoSuchFieldException e) {
                     e.printStackTrace();
@@ -800,7 +800,7 @@
                     }
                 }
             } catch (ClassNotFoundException e) {
-                throw new ModelConvertorException("Failed to load leaf identifier class." +
+                throw new ModelConverterException("Failed to load leaf identifier class." +
                                                           leafName);
             }
         }
@@ -870,7 +870,7 @@
                     }
                 }
             } catch (ClassNotFoundException e) {
-                throw new ModelConvertorException(E_FAIL_TO_LOAD_LEAF_IDENTIFIER_CLASS);
+                throw new ModelConverterException(E_FAIL_TO_LOAD_LEAF_IDENTIFIER_CLASS);
             }
         }
         return midb;
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobWorkBench.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobWorkBench.java
index e8ae1e5..ddef955 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobWorkBench.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobWorkBench.java
@@ -242,13 +242,13 @@
             method.invoke(parentObj, curObj);
         } catch (NoSuchFieldException e) {
             log.error(L_FAIL_TO_GET_FIELD, parentClassName);
-            throw new ModelConvertorException(E_FAIL_TO_GET_FIELD + parentClassName);
+            throw new ModelConverterException(E_FAIL_TO_GET_FIELD + parentClassName);
         } catch (NoSuchMethodException e) {
             log.error(L_FAIL_TO_GET_METHOD, parentClassName);
-            throw new ModelConvertorException(E_FAIL_TO_GET_METHOD + parentClassName);
+            throw new ModelConverterException(E_FAIL_TO_GET_METHOD + parentClassName);
         } catch (InvocationTargetException | IllegalAccessException e) {
             log.error(L_FAIL_TO_INVOKE_METHOD, parentClassName);
-            throw new ModelConvertorException(E_FAIL_TO_INVOKE_METHOD + parentClassName);
+            throw new ModelConverterException(E_FAIL_TO_INVOKE_METHOD + parentClassName);
         }
     }
 
@@ -279,9 +279,9 @@
                 schemaContext = parentSchema.getChildSchema(targetNode);
 
             } catch (DataModelException e) {
-                throw new ModelConvertorException(parentSchema.getName() +
+                throw new ModelConverterException(parentSchema.getName() +
                                                           E_HAS_NO_CHILD +
-                                                          targetNode.getName());
+                                                          targetNode.getName(), e);
             }
 
             nonSchemaHolder = schemaContext.getContextSwitchedNode();
@@ -346,9 +346,9 @@
                         childContext.getContextSwitchedNode());
 
             } catch (DataModelException e) {
-                throw new ModelConvertorException(ctxSwitchedNode.getName() +
+                throw new ModelConverterException(ctxSwitchedNode.getName() +
                                                           E_HAS_NO_CHILD +
-                                                          targetNode.getName());
+                                                          targetNode.getName(), e);
             }
         } else if (ctxSwitchedNode.getYangSchemaNodeType() ==
                 YANG_AUGMENT_NODE) {
@@ -376,10 +376,10 @@
             method.invoke(builder, instance);
         } catch (NoSuchMethodException e) {
             log.error(L_FAIL_TO_GET_METHOD, ADD_AUGMENT_METHOD);
-            throw new ModelConvertorException(E_FAIL_TO_GET_METHOD + ADD_AUGMENT_METHOD);
+            throw new ModelConverterException(E_FAIL_TO_GET_METHOD + ADD_AUGMENT_METHOD);
         } catch (InvocationTargetException | IllegalAccessException e) {
             log.error(L_FAIL_TO_INVOKE_METHOD, ADD_AUGMENT_METHOD);
-            throw new ModelConvertorException(E_FAIL_TO_INVOKE_METHOD + ADD_AUGMENT_METHOD);
+            throw new ModelConverterException(E_FAIL_TO_INVOKE_METHOD + ADD_AUGMENT_METHOD);
         }
     }
 
