voicemeeter-api-powershell/lib/errors.ps1
onyx-and-iris 62c65e1c08 xy and fx parameters added to strip/bus classes.
GetType, GetVersion, SendText added to Remote class.

Console output now written to Debug stream.

ToString() method overriden for higher classes.

formatter run through all files.
2022-10-27 21:20:03 +01:00

31 lines
598 B
PowerShell

class VMRemoteErrors : Exception {
[string]$msg
VMRemoteErrors ([string]$msg) {
$this.msg = $msg
}
[string] ErrorMessage () {
return $this.msg
}
}
class LoginError : VMRemoteErrors {
LoginError ([string]$msg) : base ([string]$msg) {
}
}
class CAPIError : VMRemoteErrors {
[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
}
}