//
// Copyright (c) 2009 Froduald Kabanza and the Université de Sherbrooke.
// Use of this software is permitted for non-commercial research purposes, and
// it may be copied or applied only for that use. All copies must include this
// copyright message.
// 
// This is a research prototype that has not gone through intensive tests and
// is delivered as is. It may still contain bugs. Froduald Kabanza and the
// Université de Sherbrooke disclaim any responsibility for damage that may be
// caused by using it.
//
// Please note that some files were inspired in part by the PDDL4J library:
// http://www.math-info.univ-paris5.fr/~pellier/software/software.php 
//
// Implementation: Simon Chamberland
// Project Manager: Froduald Kabanza
//

#ifndef _TYPING_EXCEPTION_H
#define _TYPING_EXCEPTION_H

#include "../Exp/term/type/Type.h"

#include <stdexcept>
#include <string>

namespace planning
{
  /// <summary>
  /// A typing exception is thrown when an error involving types occurs, for example if a cycle
  /// is found in the cycle hierarchy.
  /// </summary>
  class TypingException : public std::domain_error
  {
  public:
    /// <summary>
    /// Creates a new typing exception involving the specified type.
    /// </summary>
    /// <param name="type">The type which caused the exception.</param>
    TypingException(const std::string &msg)
      : domain_error(msg)
    {
    }
  };
}

#endif