Newer
Older
Markus Frank
committed
//==========================================================================
// AIDA Detector description implementation for LCD
Markus Frank
committed
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
Markus Frank
committed
// All rights reserved.
Markus Frank
committed
// For the licensing terms see $DD4hepINSTALL/LICENSE.
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
Markus Frank
committed
// Author : M.Frank
//
//==========================================================================
#include "DD4hep/Primitives.h"
#include "DD4hep/Exceptions.h"
#include "DD4hep/BasicGrammar.h"
// C/C++ include files
#include <stdexcept>
/// Default constructor
DD4hep::BasicGrammar::BasicGrammar() {
DD4hep::BasicGrammar::~BasicGrammar() {
}
/// Error callback on invalid conversion
void DD4hep::BasicGrammar::invalidConversion(const std::string& value, const std::type_info& to) {
std::string to_name = typeName(to);
"Data conversion of " + value + " to type '" +
Markus Frank
committed
to_name + "' is not defined.");
}
/// Error callback on invalid conversion
void DD4hep::BasicGrammar::invalidConversion(const std::type_info& from, const std::type_info& to) {
std::string to_name = typeName(to);
std::string from_name = typeName(from);
throw unrelated_type_error(from, to,
"Data conversion from '" + from_name +
Markus Frank
committed
"' to '" + to_name + "' is not implemented.");