mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Merge pull request #127 from Icinga:fix/mssql_connection_error_handling
Fixes MSSQL error handling on Integrated Security Fixes wrong error message on failed MSSQL connection due to database not reachable by using `-IntegratedSecurity`
This commit is contained in:
commit
26e335ee8a
2 changed files with 11 additions and 5 deletions
|
|
@ -11,6 +11,10 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
||||||
|
|
||||||
[Issue and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/10?closed=1)
|
[Issue and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/10?closed=1)
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
* [#127](https://github.com/Icinga/icinga-powershell-framework/issues/127) Fixes wrong error message on failed MSSQL connection due to database not reachable by using `-IntegratedSecurity`
|
||||||
|
|
||||||
## 1.2.0 (2020-08-28)
|
## 1.2.0 (2020-08-28)
|
||||||
|
|
||||||
[Issue and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/7?closed=1)
|
[Issue and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/7?closed=1)
|
||||||
|
|
|
||||||
|
|
@ -89,11 +89,13 @@ function Open-IcingaMSSQLConnection()
|
||||||
return $null;
|
return $null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ([string]::IsNullOrEmpty($Username) -eq $FALSE) {
|
||||||
Exit-IcingaThrowException `
|
Exit-IcingaThrowException `
|
||||||
-InputString $_.Exception.Message `
|
-InputString $_.Exception.Message `
|
||||||
-StringPattern $Username `
|
-StringPattern $Username `
|
||||||
-ExceptionType 'Input' `
|
-ExceptionType 'Input' `
|
||||||
-ExceptionThrown $IcingaExceptions.Inputs.MSSQLCredentialHandling;
|
-ExceptionThrown $IcingaExceptions.Inputs.MSSQLCredentialHandling;
|
||||||
|
}
|
||||||
|
|
||||||
Exit-IcingaThrowException `
|
Exit-IcingaThrowException `
|
||||||
-InputString $_.Exception.Message `
|
-InputString $_.Exception.Message `
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue