2022-06-21 15:47:42 +02:00
|
|
|
module vdocker
|
|
|
|
|
|
|
|
struct DockerError {
|
2022-06-21 20:28:25 +02:00
|
|
|
status int [skip]
|
2022-06-21 15:47:42 +02:00
|
|
|
message string
|
|
|
|
}
|
|
|
|
|
|
|
|
fn (err DockerError) code() int {
|
2022-06-21 20:28:25 +02:00
|
|
|
return err.status
|
2022-06-21 15:47:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
fn (err DockerError) msg() string {
|
2022-06-21 20:28:25 +02:00
|
|
|
return err.message
|
2022-06-21 15:47:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
fn docker_error(status int, message string) IError {
|
2022-06-21 20:28:25 +02:00
|
|
|
return IError(DockerError{
|
|
|
|
status: status
|
|
|
|
message: message
|
|
|
|
})
|
2022-06-21 15:47:42 +02:00
|
|
|
}
|