增加一个检查颜色转换时分量超限的错误。
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user