Skip to content
Snippets Groups Projects
Commit 21cba71f authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Use Log-Warning for non-critical / non-terminating messages.

parent a6b63260
No related branches found
No related tags found
No related merge requests found
...@@ -299,8 +299,7 @@ function Upload-LogFiles { ...@@ -299,8 +299,7 @@ function Upload-LogFiles {
Write-Verbose "Uploaded logfile to [$($LogfileUpload)]." Write-Verbose "Uploaded logfile to [$($LogfileUpload)]."
} }
catch { catch {
Log-Error "Uploading logfile FAILED!`n$($_.Exception.Message)" Log-Warning "Uploading logfile FAILED!`n$($_.Exception.Message)"
# do not exit here, error on log file uploading is non-critical!
} }
} }
...@@ -325,9 +324,9 @@ function Send-MailReport([string]$Subject, [string]$Body) { ...@@ -325,9 +324,9 @@ function Send-MailReport([string]$Subject, [string]$Body) {
} }
catch { catch {
$ex = $_.Exception.Message $ex = $_.Exception.Message
$msg = "Error sending email!`n`n$($msg)" $msg = "Sending email failed!`n`n$($msg)"
$msg += "Exception message: $($ex)" $msg += "Exception message: $($ex)"
Log-Error -Message $msg Log-Warning -Message $msg
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment