CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 std::shared_ptr
< HandleExceptionFactory const >
const 
s_invalidRefFactory
 

Function Documentation

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

Definition at line 15 of file ConvertHandle.cc.

References s_invalidRefFactory.

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

15 { return s_invalidRefFactory; }
static std::shared_ptr< HandleExceptionFactory const > const 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 const> 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;
})
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)

Definition at line 7 of file ConvertHandle.cc.

Referenced by makeInvalidReferenceException().