Files
flipper/xplat/Flipper/FlipperExceptions.h
Lorenzo Blasa 63dde6e5cf Exceptions
Summary:
Flipper doesn really use library specific exceptions throughout, and that's OK.

Introducing SSLException as a replacement for the existing Folly Async Socket SSL exception.

This exception originally thrown by rsocket. Because we had rsocket and websockets using the same code, websockets were creating and throwing this same exception.

With rsocket gone, we can fully replace the usage of that exception. This is also needed as to decouple Flipper from folly async components.

Reviewed By: fabiomassimo

Differential Revision: D36245624

fbshipit-source-id: f5c97c5efe063280ce95be130008dee7f4e5d788
2022-05-12 09:16:13 -07:00

31 lines
636 B
C++

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
namespace facebook {
namespace flipper {
class SSLException : public std::exception {
public:
explicit SSLException(const char* message) : msg_(message) {}
explicit SSLException(const std::string& message) : msg_(message) {}
virtual ~SSLException() noexcept {}
virtual const char* what() const noexcept {
return msg_.c_str();
}
protected:
std::string msg_;
};
} // namespace flipper
} // namespace facebook