Skip to content

🩹 [Patch]: Add debug-logging - #22

Merged
Marius Storhaug (MariusStorhaug) merged 23 commits into
mainfrom
debugging
Jan 11, 2025
Merged

🩹 [Patch]: Add debug-logging#22
Marius Storhaug (MariusStorhaug) merged 23 commits into
mainfrom
debugging

Conversation

@MariusStorhaug

@MariusStorhaug Marius Storhaug (MariusStorhaug) commented Jan 11, 2025

Copy link
Copy Markdown
Member

Description

This pull request includes several enhancements to the PowerShell scripts to improve logging, error handling, and overall structure. The most important changes are the addition of begin, process, and end blocks, improved error handling, and enhanced logging for better debugging.

Enhancements to logging and structure:

  • scripts/main.ps1: Added begin, process, and end blocks to provide a clearer structure and added debug messages at the start and end of the script. [1] [2]
  • scripts/outputs.ps1: Added begin, process, and end blocks to provide a clearer structure and added debug messages at the start and end of the script. [1] [2]

Improvements to error handling:

  • scripts/main.ps1: Enhanced error handling by adding -ErrorAction Stop to the Install-PSResource command and logging warnings for exceptions.
  • scripts/main.ps1: Wrapped the main process block in a try block to catch and rethrow exceptions, ensuring any errors are properly handled and logged.
  • scripts/outputs.ps1: Wrapped the main process block in a try block to catch and rethrow exceptions, ensuring any errors are properly handled and logged.

Type of change

  • 📖 [Docs]
  • 🪲 [Fix]
  • 🩹 [Patch]
  • ⚠️ [Security fix]
  • 🚀 [Feature]
  • 🌟 [Breaking change]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@MariusStorhaug Marius Storhaug (MariusStorhaug) changed the title Debugging 🩹 [Patch]: Add debug-logging Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant