Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Errorの種類に OutOfRange を追加する #284

Open
yutotnh opened this issue Sep 14, 2023 · 0 comments
Open

Feature: Errorの種類に OutOfRange を追加する #284

yutotnh opened this issue Sep 14, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@yutotnh
Copy link
Owner

yutotnh commented Sep 14, 2023

なぜ機能が欲しいのか

範囲外なのか、不正な値なのかをエラーから判断したいから

提案の説明

stdexcept に倣って、下記の enum class の に OutOfRange を追加する

enum class Type {
/// No error
Normal = 0,
/// Unknown code
UnknownValue = 1,
/// Illegal combination
IllegalCombination = 2,
/// Invalid_value
InvalidValue = 3,
};

OutOfRange はデューティー比の範囲外エラーに適応する。

回転方向は範囲外エラーではなく InvalidValueにする

本Isuseとは関係ないけれど、Invalid ValueInvalidにするのもいいと思う

その他

参考: stdexcept

@yutotnh yutotnh added the enhancement New feature or request label Sep 14, 2023
@yutotnh yutotnh self-assigned this Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant