Exceptions are used frequently in Crypto++. They are used to indicate well 
defined error conditions, whereas asserts are used to find programming 
mistakes. If you hit an exception, you can catch it and continue. If you 
hit an assert, it means there's a bug in your code or in Crypto++ that 
needs to be fixed (or possibly there's a hardware error that caused an 
incorrect calculation).

There is no document that explains the reasons behind the designs. Feel 
free to ask questions though. Maybe I'll write one after getting a better 
understanding of what needs to be explained.

On Thu, Nov 06, 2003 at 11:18:45PM -0600, Stephen torri wrote:
> Is there a reason for so many assert statements? I find it odd that we
> use advance C++ features like templates and namespaces but do not take
> advantage of exceptions. I have generated the doxygen manual for the CVS
> code but have not found any document which talks about the design
> reasoning of the present code structure. Is there a document that tells
> me why crypto++ is built the way it is? This would help me greatly.
> Thanks.
> 
> Stephen
> -- 
> Stephen Torri
> GPG Key: http://www.cs.wustl.edu/~storri/storri.asc


Reply via email to