CMS 3D CMS Logo

Functions | Variables
edm::handleimpl Namespace Reference

Functions

std::shared_ptr< edm::HandleExceptionFactory const > makeInvalidReferenceException ()
 
void throwConvertTypeError (std::type_info const &expected, std::type_info const &actual)
 

Variables

static const std::shared_ptr< HandleExceptionFactory const > s_invalidRefFactory
 

Function Documentation

◆ makeInvalidReferenceException()

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

Definition at line 15 of file ConvertHandle.cc.

15 { return s_invalidRefFactory; }

References s_invalidRefFactory.

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

◆ throwConvertTypeError()

void edm::handleimpl::throwConvertTypeError ( std::type_info const &  expected,
std::type_info const &  actual 
)

Definition at line 17 of file ConvertHandle.cc.

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  }

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

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

Variable Documentation

◆ s_invalidRefFactory

const std::shared_ptr<HandleExceptionFactory const> 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;
})

Definition at line 7 of file ConvertHandle.cc.

Referenced by makeInvalidReferenceException().

edm::errors::InvalidReference
Definition: EDMException.h:39
edm::errors::LogicError
Definition: EDMException.h:37
edm::makeHandleExceptionFactory
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
Definition: FunctorHandleExceptionFactory.h:45
edm::handleimpl::s_invalidRefFactory
static const std::shared_ptr< HandleExceptionFactory const > s_invalidRefFactory
Definition: ConvertHandle.cc:7
Exception
Definition: hltDiff.cc:245