Skip to content

Raise actual error when value is inconsistent#70

Merged
droideck merged 1 commit intopyasn1:mainfrom
Avasam:raise-actual-error-when-value-is-inconsistent
Aug 22, 2024
Merged

Raise actual error when value is inconsistent#70
droideck merged 1 commit intopyasn1:mainfrom
Avasam:raise-actual-error-when-value-is-inconsistent

Conversation

@Avasam
Copy link
Copy Markdown

@Avasam Avasam commented Aug 1, 2024

Fixes #52

@droideck
Copy link
Copy Markdown

I have a bit of a doubt about whether it's okay to print value or asn1Object as str in the exception.
One concern is that we might expose raw information (possible vulnerability?). Another concern, that where it's used, we usually print it as %r !r
I need to think a bit more about that.

@Avasam
Copy link
Copy Markdown
Author

Avasam commented Aug 13, 2024

I changed the message to be similar to some other messages I found. Where only the type of the object is share.

@Avasam Avasam force-pushed the raise-actual-error-when-value-is-inconsistent branch from d6357e4 to e1eaf00 Compare August 13, 2024 00:06
@droideck droideck merged commit 7a599a1 into pyasn1:main Aug 22, 2024
@Avasam Avasam deleted the raise-actual-error-when-value-is-inconsistent branch August 22, 2024 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: exceptions must derive from BaseException

2 participants