Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
4540
Description
The build methods in BuildGlobalContext declare SourceException and ReactorException to be thrown and it seems the intention is for completePhaseAction to assemble all SourceException errors into a single checked ReactorException.
However, there are several (maybe many) yang syntax violations that cause unchecked exceptions to be thrown, eg IllegalStateException and IllegalArgumentException.
If you specify an invalid type, eg "string1":
typedef revision-identifier {
type string1
}
you'll see an IllegalStateException thrown. If you specify an invalid yang statement like "grouping1" instead of "grouping", you'll see an IllegalArgumentException.
The code should be consistent and only propagate errors via the declared checked exceptions.