2022-01-19 05:16:28 +00:00
|
|
|
class VMRemoteErrors : Exception {
|
2021-05-04 17:29:38 +01:00
|
|
|
[String]$msg
|
|
|
|
|
2022-01-19 05:16:28 +00:00
|
|
|
VMRemoteErrors([String]$msg) {
|
2021-05-04 17:29:38 +01:00
|
|
|
$this.msg = $msg
|
|
|
|
}
|
|
|
|
|
|
|
|
[String] ErrorMessage() {
|
|
|
|
return $this.msg
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-19 05:16:28 +00:00
|
|
|
class LoginError : VMRemoteErrors {
|
|
|
|
LoginError([String]$msg) : Base([String]$msg) {
|
2021-04-29 20:23:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-19 05:16:28 +00:00
|
|
|
class CAPIError : VMRemoteErrors {
|
2021-04-29 20:23:02 +01:00
|
|
|
[Int]$retval
|
|
|
|
[String]$caller
|
|
|
|
|
|
|
|
CAPIError([Int]$retval, [String]$caller) {
|
|
|
|
$this.retval = $retval
|
|
|
|
$this.caller = $caller
|
|
|
|
}
|
|
|
|
|
|
|
|
[String] ErrorMessage() {
|
|
|
|
return "ERROR: CAPI return value: {0} in {1}" -f $this.retval, $this.caller
|
|
|
|
}
|
|
|
|
}
|