voicemeeter-api-powershell/lib/errors.ps1
onyx-and-iris 57e5368752 update to error classes, rework Param_Set_Multi
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.
2022-01-19 05:16:28 +00:00

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
}
}