CMS 3D CMS Logo

Functions | Variables
edm::handleimpl Namespace Reference

Functions

std::shared_ptr< edm::HandleExceptionFactorymakeInvalidReferenceException ()
 
void throwConvertTypeError (std::type_info const &expected, std::type_info const &actual)
 

Variables

static std::shared_ptr< HandleExceptionFactorys_invalidRefFactory
 

Function Documentation

std::shared_ptr< HandleExceptionFactory > edm::handleimpl::makeInvalidReferenceException ( )

Definition at line 13 of file ConvertHandle.cc.

References s_invalidRefFactory.

Referenced by edm::convert_handle(), and edm::convert_handle_check_type().

13  {
14  return s_invalidRefFactory;
15  }
static std::shared_ptr< HandleExceptionFactory > s_invalidRefFactory
Definition: ConvertHandle.cc:7
void edm::handleimpl::throwConvertTypeError ( std::type_info const &  expected,
std::type_info const &  actual 
)

Definition at line 17 of file ConvertHandle.cc.

References Exception, and edm::errors::LogicError.

Referenced by edm::convert_handle_check_type(), and edm::getProductByTag().

17  {
18  throw Exception(errors::LogicError, "TypeMismatch")
19  << "edm::BasicHandle contains a product of type " << actual.name() << ".\n"
20  << "A type of " << expected.name() << "was expected.";
21  }

Variable Documentation

std::shared_ptr<HandleExceptionFactory> edm::handleimpl::s_invalidRefFactory
static
Initial value:
= makeHandleExceptionFactory([]()->std::shared_ptr<cms::Exception> {
std::shared_ptr<cms::Exception> whyFailed = std::make_shared<edm::Exception>(errors::InvalidReference, "NullPointer");
*whyFailed << "Handle has null pointer to data product";
return whyFailed;
})
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)

Definition at line 7 of file ConvertHandle.cc.

Referenced by makeInvalidReferenceException().