Fix error message when we find something unexpected in a SEQUENCE.

This commit is contained in:
nicolson%netscape.com 2002-09-27 00:07:11 +00:00
parent f5eae8deb7
commit 65af04c0b9

View File

@ -377,9 +377,14 @@ public static class Template implements ASN1Template {
// use the default
seq.addElement( e.getDefault() );
} else {
String tagDesc;
if( lookAhead == null ) {
tagDesc = "(null)";
} else {
tagDesc = lookAhead.getTag().toString();
}
throw new InvalidBERException("Missing item #" + index +
": expecting " + lookAhead.getTag() + ", found"
+ e.getImplicitTag() );
": found " + lookAhead.getTag() );
}
continue;
}