mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 05:10:48 +00:00
31 lines
587 B
PowerShell
31 lines
587 B
PowerShell
class VMRemoteError : Exception {
|
|
[string]$msg
|
|
|
|
VMRemoteError ([string]$msg) {
|
|
$this.msg = $msg
|
|
}
|
|
|
|
[string] ErrorMessage () {
|
|
return $this.msg
|
|
}
|
|
}
|
|
|
|
class LoginError : VMRemoteError {
|
|
LoginError ([string]$msg) : base ([string]$msg) {
|
|
}
|
|
}
|
|
|
|
class CAPIError : VMRemoteError {
|
|
[int]$retval
|
|
[string]$caller
|
|
|
|
CAPIError ([int]$retval, [string]$caller) {
|
|
$this.retval = $retval
|
|
$this.caller = $caller
|
|
}
|
|
|
|
[string] ErrorMessage () {
|
|
return "CAPI return value: {0} in {1}" -f $this.retval, $this.caller
|
|
}
|
|
}
|