1 /** 2 * @file SedConstructorException.h 3 * @brief Definition of the SedConstructorException class. 4 * @author DEVISER 5 * 6 * <!-------------------------------------------------------------------------- 7 * This file is part of libSEDML. Please visit http://sed-ml.org for more 8 * information about SED-ML. The latest version of libSEDML can be found on 9 * github: https://github.com/fbergmann/libSEDML/ 10 * 11 12 * Copyright (c) 2013-2019, Frank T. Bergmann 13 * All rights reserved. 14 * 15 16 * Redistribution and use in source and binary forms, with or without 17 * modification, are permitted provided that the following conditions are met: 18 * 19 20 * 1. Redistributions of source code must retain the above copyright notice, 21 * this 22 * list of conditions and the following disclaimer. 23 * 2. Redistributions in binary form must reproduce the above copyright notice, 24 * this list of conditions and the following disclaimer in the documentation 25 * and/or other materials provided with the distribution. 26 * 27 * This library is free software; you can redistribute it and/or modify it 28 * under the terms of the GNU Lesser General Public License as published by the 29 * Free Software Foundation. A copy of the license agreement is provided in the 30 * file named "LICENSE.txt" included with this software distribution and also 31 * available online as http://sbml.org/software/libsbml/license.html 32 * ------------------------------------------------------------------------ --> 33 * 34 * @class SedConstructorException 35 * @sbmlbrief{} TODO:Definition of the SedConstructorException class. 36 */ 37 38 39 #ifndef SEDML_CONSTRUCTOR_EXCEPTION_H 40 #define SEDML_CONSTRUCTOR_EXCEPTION_H 41 42 #include <sedml/common/extern.h> 43 #include <sedml/SedNamespaces.h> 44 45 #ifdef __cplusplus 46 47 #include <string> 48 #include <stdexcept> 49 #include <algorithm> 50 51 LIBSEDML_CPP_NAMESPACE_BEGIN 52 53 54 class LIBSEDML_EXTERN SedConstructorException : public std::invalid_argument 55 { 56 public: 57 58 /** @cond doxygenLibsedmlInternal */ 59 60 /* constructor */ 61 SedConstructorException (std::string errmsg = ""); 62 SedConstructorException (std::string errmsg, std::string sedmlErrMsg); 63 SedConstructorException (std::string elementName, SedNamespaces* xmlns); 64 virtual ~SedConstructorException () throw(); 65 66 /** @endcond */ 67 68 /** 69 * Returns the message associated with this Sed exception. 70 * 71 * @return the message string. 72 */ getSedErrMsg()73 const std::string getSedErrMsg() const { return mSedErrMsg; } 74 75 private: 76 std::string mSedErrMsg; 77 }; 78 79 80 LIBSEDML_CPP_NAMESPACE_END 81 82 #endif /* __cplusplus */ 83 84 #endif /* SEDML_CONSTRUCTOR_EXCEPTION_H */ 85 86