<commit_before>// error.h
#ifndef CYCLUS_CORE_UTILITY_ERROR_H_
#define CYCLUS_CORE_UTILITY_ERROR_H_

#include <exception>
#include <string>

namespace cyclus {

/// A generic mechanism to manually manage exceptions
class Error: public std::exception {

 public:
  /// Constructs a new Error with the default message.
  Error();

  /// Constructs a new Error with a provided message
  Error(std::string  msg);

  /// Returns the error message associated with this Error.
  virtual const char* what() const throw();

  /// Returns the error message associated with this Error.
  std::string msg() const { return msg_; }

  /// sets the error message
  std::string msg(std::string msg) { msg_ = msg; }

  virtual ~Error() throw() {};

 protected:
  /// The message associated with this exception.
  std::string msg_;

 private:
  static const std::string kPrefix;

};

/// For values that are too big, too small, etc.
class ValueError: public Error {
 public:
  ValueError(std::string msg) : Error(msg) {};
};

/// For failed retrieval/insertion of key-based data into/from data structures
class KeyError: public Error {
 public:
  KeyError(std::string msg) : Error(msg) {};
};
<commit_msg>added missing return<commit_after>// error.h
#ifndef CYCLUS_CORE_UTILITY_ERROR_H_
#define CYCLUS_CORE_UTILITY_ERROR_H_

#include <exception>
#include <string>

namespace cyclus {

/// A generic mechanism to manually manage exceptions
class Error: public std::exception {

 public:
  /// Constructs a new Error with the default message.
  Error();

  /// Constructs a new Error with a provided message
  Error(std::string  msg);

  /// Returns the error message associated with this Error.
  virtual const char* what() const throw();

  /// Returns the error message associated with this Error.
  std::string msg() const { return msg_; }

  /// sets the error message
  std::string msg(std::string msg) { return msg_ = msg; }

  virtual ~Error() throw() {};

 protected:
  /// The message associated with this exception.
  std::string msg_;

 private:
  static const std::string kPrefix;

};

/// For values that are too big, too small, etc.
class ValueError: public Error {
 public:
  ValueError(std::string msg) : Error(msg) {};
};

/// For failed retrieval/insertion of key-based data into/from data structures
class KeyError: public Error {
 public:
  KeyError(std::string msg) : Error(msg) {};
};

{'fraction_non_alphanumeric': 0.11390284757118928, 'fraction_numerical': 0.0, 'mean_word_length': 3.816532258064516, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4570698', 'n_tokens_mistral': 694, 'n_tokens_neox': 671, 'n_words': 263}