Skip to content

Commit

Permalink
Issue source for uncaught exceptions (#1011)
Browse files Browse the repository at this point in the history
* Added the issue source for uncaught exception handling.

* Package version bump.
  • Loading branch information
DenisNikulin5 authored Jan 18, 2024
1 parent 6ada588 commit b1f677a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "azure-pipelines-task-lib",
"version": "4.8.0",
"version": "4.8.1",
"description": "Azure Pipelines Task SDK",
"main": "./task.js",
"typings": "./task.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion node/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export function setResult(result: TaskResult, message: string, done?: boolean):
//
process.on('uncaughtException', (err: Error) => {
setResult(TaskResult.Failed, loc('LIB_UnhandledEx', err.message));
error(String(err.stack));
error(String(err.stack), im.IssueSource.TaskInternal);
});

//
Expand Down
2 changes: 1 addition & 1 deletion powershell/VstsTaskSdk/OutFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Out-Default {
Write-Verbose -Message "$($_.ScriptStackTrace)" 4>&1 | Out-Default
Write-Verbose -Message 'Exception:' 4>&1 | Out-Default
Write-Verbose -Message $_.Exception.ToString() 4>&1 | Out-Default
Write-TaskError -Message $_.Exception.Message
Write-TaskError -Message $_.Exception.Message -IssueSource $IssueSources.TaskInternal
} elseif ($_ -is [System.Management.Automation.WarningRecord]) {
Write-TaskWarning -Message (Remove-TrailingNewLine (Out-String -InputObject $_ -Width 2147483647))
} elseif ($_ -is [System.Management.Automation.VerboseRecord] -and !$global:__vstsNoOverrideVerbose) {
Expand Down
2 changes: 1 addition & 1 deletion powershell/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion powershell/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.18.0",
"version": "0.18.1",
"private": true,
"scripts": {
"build": "node make.js build",
Expand Down

0 comments on commit b1f677a

Please sign in to comment.