docker/errors.v

22 lines
317 B
Coq
Raw Normal View History

module vdocker
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
})
}