Loading...
Searching...
No Matches
VError8.h
// Header for error type
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_VERROR_H
#define VIPS_VERROR_H
#include <cstring>
#include <ostream>
#include <stdexcept>
#include <vips/vips.h>
VIPS_NAMESPACE_START
class VIPS_CPLUSPLUS_API VError : public std::runtime_error {
public:
using std::runtime_error::runtime_error;
VError() : std::runtime_error(vips_error_buffer()) {}
const char *
what() const noexcept override
{
return std::runtime_error::what();
}
void ostream_print(std::ostream &) const;
private:
// TODO: Migrate to [[maybe_unused]] once we require C++17.
char _abi_padding[sizeof(std::exception) + sizeof(std::string) -
sizeof(std::runtime_error)] G_GNUC_UNUSED = {};
};
VIPS_NAMESPACE_END
#endif /*VIPS_VERROR_H*/
VError::what
const char * what() const noexcept override
Definition VError8.h:61
VError::VError
VError()
Definition VError8.h:53