WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Discussion options

You must be logged in to vote

Assert only throws an exception if the statement is falsy, while throw always throws an exception on call. These concepts are translated from traditional assert and throw semantics. If you still feel these are unclear, maybe PR a change and people can review it? Subjectively I don't think it's unclear, because I assume the purpose of assert and throw is commonly known, but maybe I'm wrong or misunderstand the issue?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by miwnwski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants