Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > does boost::crc_32_type generate an exception?

Thread Tools

does boost::crc_32_type generate an exception?

Posts: n/a
Can this code generate an exception under some circumstances?

unsigned CRC32(const void *Buffer, unsigned BufferLength)
boost::crc_32_type result;
result.process_bytes(Buffer, BufferLength);
return result.checksum();

I've seen the example at
but that doesn't tell me if it generates exceptions for crc_32_type alone...

Reply With Quote
Posts: n/a
a reply to myself... it seems that crc.hpp doesn't have any throw in it so I
guess it doesn't generate any exceptions. problem solved

Reply With Quote
Jorgen Grahn
Posts: n/a
On Tue, 2011-10-04, A wrote:
> a reply to myself...

OK, but please quote yourself next time to give some context.

> it seems that crc.hpp doesn't have any throw in it so I
> guess it doesn't generate any exceptions. problem solved

Have you checked so it doesn't call anything which can throw, either?

I had a quick look earlier ... their example indeed catches
exceptions, but only as std::exception and '...'. I get the feeling
it's due to some overall rule like "never let exception escape

The author should really have documented this. Perhaps he assumed
everyone knew how CRC calculation are performed ...


// Jorgen Grahn <grahn@ Oo o. . .
\X/> O o .
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to generate a user instance of SQL Server. Only an integratedconnection can generate a user instance. Harlan Messinger ASP .Net 2 03-28-2010 06:51 PM
How to generate warnings when How generate a warning when int is converted to bool or vice versa? C++ 3 04-06-2006 11:24 PM
How to generate variable labels for same component within a generate loop Weng Tianxiang VHDL 5 02-16-2006 01:45 PM
Count(*) in a Subquery with multiple tables: How does SQL determine which table to generate the Count() from? Kaimuri MCSD 3 12-29-2004 06:38 PM
XslTransform.transform does not generate xhtml Bob Yuan ASP .Net 1 07-31-2003 08:01 PM