16 Commits

Author SHA1 Message Date
CanbiZ
70a72f1356 Add cleanup handler for failed LXC installations
Introduces the cleanup_failed_lxc function to prompt for and remove broken containers after failed LXC installs. Updates catch_errors to invoke this cleanup on EXIT, ensuring failed containers are handled automatically or with user confirmation.
2025-11-17 11:46:51 +01:00
CanbiZ
ee5fe3439d extend error messages 206,207,208,209 / 215, 216, 217, 218 / 222, 223, 231 2025-11-17 11:36:00 +01:00
CanbiZ
c0fc74bc9c Add detailed documentation and refactor core functions
Expanded inline documentation and section headers across misc/api.func, misc/build.func, misc/core.func, misc/error_handler.func, and misc/install.func for improved maintainability and clarity. Refactored error handling to use centralized explain_exit_code and updated API telemetry/reporting logic. Enhanced modularity and structure of utility, validation, and setup functions, and improved comments for user guidance and developer onboarding.
2025-11-17 11:17:04 +01:00
CanbiZ
27bb9e5192 Improve install log handling for containers
Enhances the build and error handler scripts to better manage installation logs. On install failure, the log is now copied from the container to the host for easier debugging. The error handler now saves the log inside the container's /root directory for later retrieval, improving traceability and support.
2025-11-04 17:10:28 +01:00
CanbiZ
b55e8f5f34 Improve logging and error handling with session IDs
Introduces a SESSION_ID variable for log file naming and tracking, updates log file paths to include timestamps and session IDs, and enhances error handling output to use custom message functions when available. Also improves log file management and user guidance for viewing logs, and refactors error handler to better support containerized environments.
2025-11-04 16:59:02 +01:00
CanbiZ
b840a8aa32 Replace init_error_traps with catch_errors in scripts
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
Replaces all occurrences of the 'init_error_traps' function with 'catch_errors' across container and install scripts for consistency in error handling. Also adjusts indentation and formatting in some scripts for improved readability.
2025-09-19 08:53:49 +02:00
CanbiZ
adf51e7086 Update error_handler.func 2025-09-16 16:02:19 +02:00
CanbiZ
d89e19db74 testing error 2025-09-16 10:56:56 +02:00
CanbiZ
cb29e50080 testing 2025-09-16 10:49:47 +02:00
CanbiZ
ba51df5bb1 testing 2025-09-16 10:41:55 +02:00
CanbiZ
67ebb3782c fixes 2025-09-16 10:26:00 +02:00
CanbiZ
61c9c5ce80 Update error_handler.func 2025-09-16 10:20:47 +02:00
CanbiZ
0e66031e3c error-handler 2025-09-16 09:59:06 +02:00
CanbiZ
5c750affa5 error-log 2025-09-16 08:58:01 +02:00
CanbiZ
a5a58d87b4 Improve error handling and silent logging
Expanded explain_exit_code with more exit codes for various tools (APT, Node.js, Python, databases) for better diagnostics. Updated silent() to set BASH_COMMAND on failure for improved error context.
2025-09-15 15:43:58 +02:00
CanbiZ
c3fd7ea4e4 rename 2025-09-15 15:27:49 +02:00