mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 05:10:48 +00:00
57e5368752
Added VMRemoteErrors. Other error classes now subclass VMRemoteErrors. rework Function Param_Set_Multi added throw LoginError object on multiple login attempts (still crashing the powershell window during testing if in same powershell fork) update readme to include vban_instream, vban_outstream example in set parameters by hash. macrobutton in hash can now use key button or mb.
31 lines
592 B
PowerShell
31 lines
592 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
|
|
}
|
|
}
|