Skip to content

Added warning in the catch block#2888

Merged
KoenZomers merged 6 commits intopnp:devfrom
ChrisRo89:MoveFileWarning
Mar 20, 2023
Merged

Added warning in the catch block#2888
KoenZomers merged 6 commits intopnp:devfrom
ChrisRo89:MoveFileWarning

Conversation

@ChrisRo89
Copy link
Contributor

Before creating a pull request, make sure that you have read the contribution file located at

https://github.com/pnp/powerShell/blob/dev/CONTRIBUTING.md

Type

  • Bug Fix
  • New Feature
  • Sample

Added warning message for catch block related to MoveFile

catch
catch (Exception ex)
{
WriteWarning(ex.Message);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand why you want to visualize this situation, not sure yet if warning is the best method for this as it may break automated builds that are using this today. Verbose might be a safer option. @gautamdsheth What's your take on this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, WriteVerbose is the safer option for this exception, we don't want to break scripts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All right thank you for you feedback - I'll change it and update the branch

@KoenZomers KoenZomers added the in review PR or issue is currently being reviewed label Mar 14, 2023
@ChrisRo89 ChrisRo89 requested review from KoenZomers and gautamdsheth and removed request for KoenZomers and gautamdsheth March 19, 2023 18:24
@KoenZomers
Copy link
Collaborator

Thanks @ChrisRo89 !

@KoenZomers KoenZomers merged commit 4c9962b into pnp:dev Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in review PR or issue is currently being reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants