mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-18 13:33:31 +00:00
remove Write-Warning for CAPIErrors.
Allow them to bubble up. (Might be worth adding a helper function to print stacktrace?)
This commit is contained in:
@@ -24,14 +24,9 @@ function Set_Profile {
|
||||
param(
|
||||
[Object]$DATA, [string]$CONF
|
||||
)
|
||||
try {
|
||||
if ($null -eq $DATA -or -not $DATA.$CONF) {
|
||||
throw [VMRemoteErrors]::new("No profile named $CONF was loaded")
|
||||
}
|
||||
Param_Set_Multi -HASH $DATA.$CONF
|
||||
Start-Sleep -m 1
|
||||
}
|
||||
catch [VMRemoteErrors] {
|
||||
Write-Warning $_.Exception.ErrorMessage()
|
||||
if ($null -eq $DATA -or -not $DATA.$CONF) {
|
||||
throw [VMRemoteErrors]::new("No profile named '$CONF' has been loaded into memory.")
|
||||
}
|
||||
Param_Set_Multi -HASH $DATA.$CONF
|
||||
Start-Sleep -m 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user