docker/errors.v

22 lines
316 B
Coq
Raw Normal View History

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