2018-03-19 06:49:51 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*/
|
|
|
|
|
2018-04-10 19:45:33 +00:00
|
|
|
#pragma once
|
|
|
|
|
2018-03-19 06:49:51 +00:00
|
|
|
#include <exception>
|
|
|
|
|
|
|
|
namespace facebook {
|
|
|
|
namespace react {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An abstract class for C++-based exception handling that differentiates
|
|
|
|
* soft exceptions from fatal exceptions.
|
|
|
|
*/
|
|
|
|
class ExceptionManager {
|
|
|
|
public:
|
2018-03-19 21:23:24 +00:00
|
|
|
virtual ~ExceptionManager() = default;
|
|
|
|
|
2018-03-19 06:49:51 +00:00
|
|
|
virtual void handleSoftException(const std::exception &e) const = 0;
|
|
|
|
virtual void handleFatalException(const std::exception &e) const = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace react
|
|
|
|
} // namespace facebook
|