chromedriver_api/
error.rs1use macron::{ Display, Error, From };
2
3pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error + std::marker::Send + std::marker::Sync + 'static>>;
5
6#[derive(Debug, Display, Error, From)]
8pub enum Error {
9 #[display = "Couldn't get the directory of the root path"]
10 InvalidRootPath,
11
12 #[display = "The path contains invalid UTF-8 characters"]
13 InvalidPath,
14
15 #[display = "Incorrect session ID"]
16 IncorrectSessionId,
17
18 #[display = "Incorrect window handle"]
19 IncorrectWindowHandle,
20
21 #[display = "Incorrect window handles list"]
22 IncorrectWindowHandles,
23
24 #[display = "No window handles found"]
25 NoWindowHandles,
26
27 #[display = "Failed to connect to CDP (Chrome DevTools Protocol)"]
28 CdpConnectionFailed,
29
30 #[display = "CDP command execution failed"]
31 CdpCommandFailed,
32
33 #[display = "Element not found for the given selector"]
34 ElementNotFound,
35
36
37 #[display = "Unexpected script response value"]
38 UnexpectedResponse,
39}