mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
add DLL_LINKAGE + out-of-line dtor for all exceptions
This commit is contained in:
@@ -16,6 +16,7 @@ set(lib_SRCS
|
||||
filesystem/MinizipExtensions.cpp
|
||||
filesystem/ResourcePath.cpp
|
||||
|
||||
json/JsonFormatException.cpp
|
||||
json/JsonNode.cpp
|
||||
json/JsonParser.cpp
|
||||
json/JsonUtils.cpp
|
||||
@@ -97,6 +98,7 @@ set(lib_MAIN_SRCS
|
||||
campaign/CampaignRegionsHandler.cpp
|
||||
|
||||
constants/EntityIdentifiers.cpp
|
||||
constants/IdentifierBase.cpp
|
||||
|
||||
entities/artifact/ArtifactUtils.cpp
|
||||
entities/artifact/ArtSlotInfo.cpp
|
||||
@@ -192,6 +194,7 @@ set(lib_MAIN_SRCS
|
||||
modding/ContentTypeHandler.cpp
|
||||
modding/IdentifierStorage.cpp
|
||||
modding/ModDescription.cpp
|
||||
modding/ModIncompatibility.cpp
|
||||
modding/ModManager.cpp
|
||||
modding/ModUtility.cpp
|
||||
modding/ModVerificationInfo.cpp
|
||||
@@ -316,6 +319,7 @@ set(lib_MAIN_SRCS
|
||||
CScriptingModule.cpp
|
||||
CSkillHandler.cpp
|
||||
CStack.cpp
|
||||
ExceptionsCommon.cpp
|
||||
GameSettings.cpp
|
||||
IHandlerBase.cpp
|
||||
LoadProgress.cpp
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* ExceptionsCommon.cpp, part of VCMI engine
|
||||
*
|
||||
* Authors: listed in file AUTHORS in main folder
|
||||
*
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "ExceptionsCommon.h"
|
||||
|
||||
DataLoadingException::~DataLoadingException() = default;
|
||||
ModLoadingException::~ModLoadingException() = default;
|
||||
@@ -13,6 +13,7 @@ class DLL_LINKAGE DataLoadingException: public std::runtime_error
|
||||
{
|
||||
public:
|
||||
using std::runtime_error::runtime_error;
|
||||
~DataLoadingException() override;
|
||||
};
|
||||
|
||||
class DLL_LINKAGE ModLoadingException: public DataLoadingException
|
||||
@@ -21,4 +22,5 @@ public:
|
||||
ModLoadingException(const std::string & modName, const std::string & reason)
|
||||
: DataLoadingException("Mod " + modName + " is corrupted! Please disable or reinstall this mod. Reason: " + reason)
|
||||
{}
|
||||
~ModLoadingException() override;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* IdentifierBase.cpp, part of VCMI engine
|
||||
*
|
||||
* Authors: listed in file AUTHORS in main folder
|
||||
*
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "IdentifierBase.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
IdentifierResolutionException::~IdentifierResolutionException() = default;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class IdentifierResolutionException : public std::runtime_error
|
||||
class DLL_LINKAGE IdentifierResolutionException : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
const std::string identifierName;
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
: std::runtime_error("Failed to resolve identifier " + identifierName)
|
||||
, identifierName(identifierName)
|
||||
{}
|
||||
~IdentifierResolutionException() override;
|
||||
};
|
||||
|
||||
class IdentifierBase
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
DecompressionException::~DecompressionException() = default;
|
||||
|
||||
static const int inflateBlockSize = 10000;
|
||||
|
||||
CBufferedStream::CBufferedStream():
|
||||
|
||||
@@ -15,10 +15,11 @@ struct z_stream_s;
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
class DecompressionException : public std::runtime_error
|
||||
class DLL_LINKAGE DecompressionException : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
using runtime_error::runtime_error;
|
||||
~DecompressionException() override;
|
||||
};
|
||||
|
||||
/// Abstract class that provides buffer for one-directional input streams (e.g. compressed data)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* JsonFormatException.cpp, part of VCMI engine
|
||||
*
|
||||
* Authors: listed in file AUTHORS in main folder
|
||||
*
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "JsonFormatException.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
JsonFormatException::~JsonFormatException() = default;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
@@ -15,6 +15,7 @@ class DLL_LINKAGE JsonFormatException : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
using runtime_error::runtime_error;
|
||||
~JsonFormatException() override;
|
||||
};
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
||||
@@ -28,7 +28,7 @@ struct Component;
|
||||
class CStackBasicDescriptor;
|
||||
class IGameRandomizer;
|
||||
|
||||
class JsonRandomizationException : public std::runtime_error
|
||||
class DLL_LINKAGE JsonRandomizationException : public std::runtime_error
|
||||
{
|
||||
std::string cleanupJson(const JsonNode & value);
|
||||
public:
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* ModIncompatibility.cpp, part of VCMI engine
|
||||
*
|
||||
* Authors: listed in file AUTHORS in main folder
|
||||
*
|
||||
* License: GNU General Public License v2.0 or later
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "ModIncompatibility.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
ModIncompatibility::~ModIncompatibility() = default;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
@@ -17,6 +17,7 @@ VCMI_LIB_NAMESPACE_BEGIN
|
||||
class DLL_LINKAGE ModIncompatibility: public std::exception
|
||||
{
|
||||
public:
|
||||
~ModIncompatibility() override;
|
||||
using ModList = std::vector<std::string>;
|
||||
|
||||
ModIncompatibility(const ModList & _missingMods)
|
||||
|
||||
Reference in New Issue
Block a user