smalltalk
/
osmo-st-asn1
Archived
1
0
Fork 0

ber: Throw an exception that is working.

This commit is contained in:
Holger Hans Peter Freyther 2011-03-29 19:59:15 +02:00
parent d0eeb9fa0f
commit 3034cb9fc1
1 changed files with 2 additions and 3 deletions

5
BER.st
View File

@ -73,9 +73,8 @@ Object subclass: BERElement [
"Transcript show: '*** Next byte is: ', firstByte asString; cr."
elementClass := self identifyIncomingElement: firstByte.
elementClass ifNil:
[(LDAPException new)
messageText: 'invalid tag -- make sure class is in identifyIncomingElements';
signal].
[self error:
'invalid tag -- make sure class is in identifyIncomingElements: ', firstByte asString.].
element := elementClass new setTag: firstByte.
"we should read the tag here, instead of just the first byte"
element readLengthFrom: aStream.