Implement verbose error feedback across all scripts

- Enhanced die() function with environment context and stack trace
- Added detailed error output with line numbers and file paths
- Improved check_dependencies with installation guides
- Enhanced PHP syntax validation with full error details
- Added verbose error messages to manifest, tabs, and paths validations
- Updated validate_all to show error summaries (full output in verbose mode)
- Updated smoke_test with detailed PHP error reporting
- Updated ENTERPRISE.md with verbose error examples
- All error messages now provide actionable troubleshooting steps

Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-03 23:16:45 +00:00
parent 0341131f18
commit aaa6560d74
8 changed files with 228 additions and 44 deletions

View File

@@ -150,16 +150,29 @@ log_info "Checking PHP syntax..."
if command -v php >/dev/null 2>&1; then
php_errors=0
failed_files=()
while IFS= read -r -d '' f; do
if ! php -l "$f" >/dev/null 2>&1; then
if ! php_output=$(php -l "$f" 2>&1); then
log_error "PHP syntax error in: $f"
echo " Error details:" >&2
echo "$php_output" | sed 's/^/ /' >&2
echo "" >&2
php_errors=$((php_errors + 1))
failed_files+=("$f")
fi
done < <(find src -type f -name '*.php' -print0 2>/dev/null)
if [ "${php_errors}" -eq 0 ]; then
log_info "✓ PHP syntax validation passed"
else
echo "Summary of PHP syntax errors:" >&2
echo " Total errors: ${php_errors}" >&2
echo " Failed files:" >&2
for f in "${failed_files[@]}"; do
echo " - $f" >&2
done
echo "" >&2
echo "To fix: Run 'php -l <filename>' on each failed file for detailed error messages." >&2
die "Found ${php_errors} PHP syntax errors"
fi
else