diff --git a/security/jss/org/mozilla/jss/asn1/SEQUENCE.java b/security/jss/org/mozilla/jss/asn1/SEQUENCE.java index 53cdc83659df..8dec35b7bbbb 100644 --- a/security/jss/org/mozilla/jss/asn1/SEQUENCE.java +++ b/security/jss/org/mozilla/jss/asn1/SEQUENCE.java @@ -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; }