mirror of
				https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
				synced 2025-11-04 06:11:46 +00:00 
			
		
		
		
	ErrorMessage removed from error classes
This commit is contained in:
		
							parent
							
								
									a78cdf9a99
								
							
						
					
					
						commit
						844eaeabaa
					
				@ -1,17 +1,10 @@
 | 
				
			|||||||
class VMRemoteError : Exception {
 | 
					class VMRemoteError : Exception {
 | 
				
			||||||
    [string]$msg
 | 
					    VMRemoteError ([string]$msg) : base ($msg) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    VMRemoteError ([string]$msg) {
 | 
					 | 
				
			||||||
        $this.msg = $msg
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    [string] ErrorMessage () {
 | 
					 | 
				
			||||||
        return $this.msg
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class LoginError : VMRemoteError {
 | 
					class LoginError : VMRemoteError {
 | 
				
			||||||
    LoginError ([string]$msg) : base ([string]$msg) {
 | 
					    LoginError ([string]$msg) : base ($msg) {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -19,12 +12,8 @@ class CAPIError : VMRemoteError {
 | 
				
			|||||||
    [int]$retval
 | 
					    [int]$retval
 | 
				
			||||||
    [string]$caller
 | 
					    [string]$caller
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    CAPIError ([int]$retval, [string]$caller) {
 | 
					    CAPIError ([int]$retval, [string]$caller) : base ("$caller returned $retval") {
 | 
				
			||||||
        $this.retval = $retval
 | 
					        $this.retval = $retval
 | 
				
			||||||
        $this.caller = $caller
 | 
					        $this.caller = $caller
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
    [string] ErrorMessage () {
 | 
					 | 
				
			||||||
        return "CAPI return value: {0} in {1}" -f $this.retval, $this.caller
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user