This file is indexed.

/usr/include/caf/exception.hpp is in libcaf-dev 0.13.2-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/******************************************************************************
 *                       ____    _    _____                                   *
 *                      / ___|  / \  |  ___|    C++                           *
 *                     | |     / _ \ | |_       Actor                         *
 *                     | |___ / ___ \|  _|      Framework                     *
 *                      \____/_/   \_|_|                                      *
 *                                                                            *
 * Copyright (C) 2011 - 2015                                                  *
 * Dominik Charousset <dominik.charousset (at) haw-hamburg.de>                *
 *                                                                            *
 * Distributed under the terms and conditions of the BSD 3-Clause License or  *
 * (at your option) under the terms and conditions of the Boost Software      *
 * License 1.0. See accompanying files LICENSE and LICENSE_ALTERNATIVE.       *
 *                                                                            *
 * If you did not receive a copy of the license files, see                    *
 * http://opensource.org/licenses/BSD-3-Clause and                            *
 * http://www.boost.org/LICENSE_1_0.txt.                                      *
 ******************************************************************************/

#ifndef CAF_EXCEPTION_HPP
#define CAF_EXCEPTION_HPP

#include <string>
#include <cstdint>
#include <exception>
#include <stdexcept>

namespace caf {

/**
 * Base class for exceptions.
 */
class caf_exception : public std::exception {

 public:

  ~caf_exception() noexcept;

  caf_exception() = delete;
  caf_exception(const caf_exception&) = default;
  caf_exception& operator=(const caf_exception&) = default;

  /**
   * Returns the error message.
   */
  const char* what() const noexcept;

 protected:

  /**
   * Creates an exception with the error string `what_str`.
   */
  caf_exception(std::string&& what_str);

  /**
   * Creates an exception with the error string `what_str`.
   */
  caf_exception(const std::string& what_str);

 private:

  std::string m_what;

};

/**
 * Thrown if an actor finished execution.
 */
class actor_exited : public caf_exception {

 public:

  ~actor_exited() noexcept;

  actor_exited(uint32_t exit_reason);

  actor_exited(const actor_exited&) = default;
  actor_exited& operator=(const actor_exited&) = default;

  /**
   * Returns the exit reason.
   */
  inline uint32_t reason() const noexcept;

 private:

  uint32_t m_reason;

};

/**
 * Thrown to indicate that either an actor publishing failed or
 * the middleman was unable to connect to a remote host.
 */
class network_error : public caf_exception {

  using super = caf_exception;

 public:

  ~network_error() noexcept;
  network_error(std::string&& what_str);
  network_error(const std::string& what_str);
  network_error(const network_error&) = default;
  network_error& operator=(const network_error&) = default;

};

/**
 * Thrown to indicate that an actor publishing failed because
 * the requested port could not be used.
 */
class bind_failure : public network_error {

  using super = network_error;

 public:

  ~bind_failure() noexcept;

  bind_failure(std::string&& what_str);
  bind_failure(const std::string& what_str);
  bind_failure(const bind_failure&) = default;
  bind_failure& operator=(const bind_failure&) = default;

};

inline uint32_t actor_exited::reason() const noexcept {
  return m_reason;
}

} // namespace caf

#endif // CAF_EXCEPTION_HPP