Skip to content

Commit

Permalink
Migrate to cms::Exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
yana committed Mar 21, 2012
1 parent ee576be commit 69a9f6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Fireworks/Geometry/src/TGeoMgrFromDdd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
// Original Author:
// Created: Fri Jul 2 16:11:42 CEST 2010
// $Id: TGeoMgrFromDdd.cc,v 1.10 2010/12/15 13:47:58 yana Exp $
// $Id: TGeoMgrFromDdd.cc,v 1.11 2012/01/27 11:19:55 yana Exp $
//

#include "Fireworks/Geometry/interface/TGeoMgrFromDdd.h"
Expand Down Expand Up @@ -375,7 +375,7 @@ TGeoMgrFromDdd::createShape(const std::string& iName,
}
else
{
throw DDException( "Check parameters of the PseudoTrap! name=" + pt.name().name());
throw cms::Exception( "Check parameters of the PseudoTrap! name=" + pt.name().name());
}

std::auto_ptr<TGeoShape> trap( new TGeoTrd2( pt.name().name().c_str(),
Expand Down Expand Up @@ -486,17 +486,17 @@ TGeoMgrFromDdd::createShape(const std::string& iName,
if( rIn <= 0 || rOut <=0 || cutAtStart <=0 || cutAtDelta <= 0 )
{
std::string s = "TruncTubs " + std::string( tt.name().fullname()) + ": 0 <= rIn,cutAtStart,rOut,cutAtDelta,rOut violated!";
throw DDException( s );
throw cms::Exception( s );
}
if( rIn >= rOut )
{
std::string s = "TruncTubs " + std::string( tt.name().fullname()) + ": rIn<rOut violated!";
throw DDException(s);
throw cms::Exception(s);
}
if( startPhi != 0. )
{
std::string s= "TruncTubs " + std::string( tt.name().fullname()) + ": startPhi != 0 not supported!";
throw DDException( s );
throw cms::Exception( s );
}

startPhi = 0.;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "GeometryReaders/XMLIdealGeometryESSource/interface/XMLIdealGeometryESSource.h"

#include "DetectorDescription/Base/interface/DDException.h"
#include "DetectorDescription/Base/interface/DDdebug.h"
#include "DetectorDescription/Parser/interface/DDLParser.h"
#include "DetectorDescription/Core/interface/DDCompactView.h"
Expand All @@ -26,7 +25,7 @@ XMLIdealGeometryESSource::XMLIdealGeometryESSource(const edm::ParameterSet & p):
geoConfig_(p)
{
if ( rootNodeName_ == "" || rootNodeName_ == "\\" ) {
throw DDException ("XMLIdealGeometryESSource must have a root node name.");
throw cms::Exception("DDException") << "XMLIdealGeometryESSource must have a root node name.";
}

if ( rootNodeName_ == "MagneticFieldVolumes:MAGF" || rootNodeName_ == "cmsMagneticField:MAGF") {
Expand Down Expand Up @@ -65,7 +64,7 @@ XMLIdealGeometryESSource::produce() {
DDLParser parser(*returnValue); //* parser = DDLParser::instance();
parser.getDDLSAX2FileHandler()->setUserNS(userNS_);
int result2 = parser.parse(geoConfig_);
if (result2 != 0) throw DDException("DDD-Parser: parsing failed!");
if (result2 != 0) throw cms::Exception("DDException") << "DDD-Parser: parsing failed!";

// after parsing the root node should be valid!

Expand Down

0 comments on commit 69a9f6d

Please sign in to comment.