When catching and re-throwing exceptions, preserve the original exception
chain by passing the caught exception as the third parameter to new Exception.
This retains the full stack trace for debugging while keeping descriptive
error messages.
Changes:
- validateDockerComposeForInjection(): 4 locations fixed
- validateVolumeStringForInjection(): 3 locations fixed
Before:
throw new \Exception('Invalid Docker volume definition: '.$e->getMessage());
After:
throw new \Exception('Invalid Docker volume definition: '.$e->getMessage(), 0, $e);
Benefits:
- Full stack trace preserved for debugging
- Original exception context retained
- Better error diagnostics in production logs
All 60 security tests pass (176 assertions).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| api.php | ||
| applications.php | ||
| constants.php | ||
| databases.php | ||
| docker.php | ||
| domains.php | ||
| github.php | ||
| notifications.php | ||
| parsers.php | ||
| proxy.php | ||
| remoteProcess.php | ||
| services.php | ||
| shared.php | ||
| socialite.php | ||
| subscriptions.php | ||
| sudo.php | ||
| timezone.php | ||