Add TranslatorException, YangJavaModelUtils

Change-Id: I8c8d8d36a69ff24613218892532fd3bfada1fcdf
diff --git a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaModelUtils.java b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaModelUtils.java
index 58eee77..8687115 100644
--- a/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaModelUtils.java
+++ b/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaModelUtils.java
@@ -300,7 +300,7 @@
             YangPluginConfig yangPluginConfig)
             throws IOException {
         if (!(javaCodeGeneratorInfo instanceof YangNode)) {
-            // TODO:throw exception
+            throw new TranslatorException("invalid node for translation");
         }
         updatePackageInfo(javaCodeGeneratorInfo, yangPluginConfig);
         generateTempFiles(javaCodeGeneratorInfo, yangPluginConfig);
@@ -318,7 +318,7 @@
                                               YangPluginConfig yangPluginConfig, String rootPkg)
             throws IOException {
         if (!(javaCodeGeneratorInfo instanceof YangNode)) {
-            // TODO:throw exception
+            throw new TranslatorException("invalid node for translation");
         }
         updatePackageInfo(javaCodeGeneratorInfo, yangPluginConfig, rootPkg);