Kaydet (Commit) c8b77ecc authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1339308 Uncaught exception

Change-Id: Id63bbdd11af66de6be8a3e9dfca1c7efbe74b08a
üst b3bc0b36
...@@ -123,7 +123,7 @@ private: ...@@ -123,7 +123,7 @@ private:
public: public:
enum Exception { INVALIDENTRY }; class Exception : public std::exception { };
PoIfstream(); PoIfstream();
PoIfstream( const OString& rFileName ); PoIfstream( const OString& rFileName );
......
...@@ -45,15 +45,12 @@ namespace ...@@ -45,15 +45,12 @@ namespace
{ {
rPoFile.readEntry( o_rPoEntry ); rPoFile.readEntry( o_rPoEntry );
} }
catch( PoIfstream::Exception& aException ) catch (const PoIfstream::Exception&)
{ {
if( aException == PoIfstream::INVALIDENTRY ) printf(
{ "Warning : %s contains invalid entry\n",
printf( rFileName.getStr() );
"Warning : %s contains invalid entry\n", return false;
rFileName.getStr() );
return false;
}
} }
return true; return true;
} }
......
...@@ -596,7 +596,7 @@ void PoIfstream::readEntry( PoEntry& rPoEntry ) ...@@ -596,7 +596,7 @@ void PoIfstream::readEntry( PoEntry& rPoEntry )
} }
else else
{ {
throw INVALIDENTRY; throw PoIfstream::Exception();
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment