增加一个检查颜色转换时分量超限的错误。
This commit is contained in:
parent
0c1c3ad3db
commit
d8e7a33071
|
@ -5,6 +5,8 @@ use wasm_bindgen::JsValue;
|
|||
pub enum ColorError {
|
||||
#[error("Invalid RGB value: {0}")]
|
||||
UnrecogniazedRGB(String),
|
||||
#[error("Some color component is out of bounds")]
|
||||
ComponentOutOfBounds,
|
||||
}
|
||||
|
||||
impl Into<JsValue> for ColorError {
|
||||
|
|
Loading…
Reference in New Issue
Block a user