mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 05:10:48 +00:00
62c65e1c08
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.
31 lines
598 B
PowerShell
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
|
|
}
|
|
}
|