minor changes.

This commit is contained in:
onyx-and-iris 2022-12-18 04:30:51 +00:00
parent 3b1e469d2d
commit 828a9a5731
3 changed files with 9 additions and 9 deletions

View File

@ -3,13 +3,13 @@ function Setup_DLL {
$vb_path = Get_VBPath $vb_path = Get_VBPath
if ([string]::IsNullOrWhiteSpace($vb_path)) { if ([string]::IsNullOrWhiteSpace($vb_path)) {
throw [VMRemoteErrors]::new("ERROR: Couldn't get Voicemeeter path") throw [VMRemoteError]::new("couldn't get Voicemeeter path")
} }
$dll = Join-Path -Path $vb_path -ChildPath ("VoicemeeterRemote" + ` $dll = Join-Path -Path $vb_path -ChildPath ("VoicemeeterRemote" + `
(& { if ([Environment]::Is64BitOperatingSystem) { "64" } else { "" } }) + ` (& { if ([Environment]::Is64BitOperatingSystem) { "64" } else { "" } }) + `
".dll") ".dll")
} }
catch [VMRemoteErrors] { catch [VMRemoteError] {
Write-Warning $_.Exception.ErrorMessage() Write-Warning $_.Exception.ErrorMessage()
return $false return $false
} }

View File

@ -1,7 +1,7 @@
class VMRemoteErrors : Exception { class VMRemoteError : Exception {
[string]$msg [string]$msg
VMRemoteErrors ([string]$msg) { VMRemoteError ([string]$msg) {
$this.msg = $msg $this.msg = $msg
} }
@ -10,12 +10,12 @@ class VMRemoteErrors : Exception {
} }
} }
class LoginError : VMRemoteErrors { class LoginError : VMRemoteError {
LoginError ([string]$msg) : base ([string]$msg) { LoginError ([string]$msg) : base ([string]$msg) {
} }
} }
class CAPIError : VMRemoteErrors { class CAPIError : VMRemoteError {
[int]$retval [int]$retval
[string]$caller [string]$caller
@ -25,6 +25,6 @@ class CAPIError : VMRemoteErrors {
} }
[string] ErrorMessage () { [string] ErrorMessage () {
return "ERROR: CAPI return value: {0} in {1}" -f $this.retval, $this.caller return "CAPI return value: {0} in {1}" -f $this.retval, $this.caller
} }
} }

View File

@ -28,6 +28,6 @@ $KindMap = @{
}; };
} }
function GetKind ([string]$kind_id) { function GetKind ([string]$kindId) {
$KindMap[$kind_id] $KindMap[$kindId]
} }