Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inline UInt asUInt_(const String & in)
- {
- UInt res = 0;
- try
- {
- Int tmp = in.toInt();
- if (tmp < 0)
- {
- Exception::ConversionError(__FILE__, __LINE__,
- __PRETTY_FUNCTION__, "");
- }
- res = UInt(tmp);
- }
- catch (Exception::ConversionError)
- {
- error(LOAD,
- String("UInt conversion error of \"") + in + "\"");
- }
- return res;
- }
- This suspicious code was found in OpenMS project by PVS-Studio static code analyzer.
- Warning message is:
- V596 The object was created but it is not being used. The 'throw' keyword could be missing: throw ConversionError(FOO); xmlhandler.h 247
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment