Skip to content

Commit

Permalink
refactor: log error in errorForUnsavedResource
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Nov 20, 2024
1 parent 208ed81 commit 2d79f50
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/zowe-explorer/src/utils/TreeViewUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ export class TreeViewUtils {

for (const doc of openedTextDocuments) {
if ((doc.fileName === currentFilePath || SharedUtils.checkIfChildPath(currentFilePath, doc.fileName)) && doc.isDirty) {
ZoweLogger.error(
`TreeViewUtils.errorForUnsavedResource: detected unsaved changes in ${doc.fileName},` +
`trying to ${action} node: ${node.label as string}`
);
Gui.errorMessage(
l10n.t({
message: "Unable to {0} {1} because you have unsaved changes in this {2}. " + "Please save your work and try again.",
Expand Down

0 comments on commit 2d79f50

Please sign in to comment.