使用标准异常处理

This commit is contained in:
2024-02-07 04:14:09 +08:00
parent 4f358ed42d
commit 28c68d2871
7 changed files with 63 additions and 20 deletions

View File

@@ -1,5 +1,7 @@
// 版权所有 (c) ling 保留所有权利。
// 除非另行说明否则仅允许在parameter中使用此文件中的代码。
//
// Created by ling on 24-2-4.
// ling 创建于 24-2-4.
//
#ifndef OPTIONS_H

View File

@@ -0,0 +1,21 @@
// 版权所有 (c) ling 保留所有权利。
// 除非另行说明否则仅允许在parameter中使用此文件中的代码。
//
// 由 ling 创建于 24-2-7.
//
#ifndef OPTIONSEXCEPTION_H
#define OPTIONSEXCEPTION_H
#include <stdexcept>
namespace ling {
class OptionsException : public std::runtime_error {
public:
explicit OptionsException(const std::string &err);
explicit OptionsException(const char *err);
};
} // ling
#endif //OPTIONSEXCEPTION_H

View File

@@ -1,5 +1,7 @@
// 版权所有 (c) ling 保留所有权利。
// 除非另行说明否则仅允许在parameter中使用此文件中的代码。
//
// Created by ling on 24-2-4.
// ling 创建于 24-2-4.
//
#ifndef ORDER_H