mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-10-17 02:45:05 +00:00
app-module - Apps now have support for: - environment variables (inherit from parent app) - current workdir - window size (when running in terminal) - Add type aliases like `AppId` and `PackageId` - Remove data duplication between ledger and app instance records: create `AppManifestSet` - `AppManifest` usage safety improved: pass by value where needed, or use `AppId` instead of a manifest. Terminal and shell - Moved shell commands into coreutils-module as proper apps. - Refine stack size for terminal and shell because apps now run with their own task and stack (including in-memory apps) Platform - Fix for listing root dir on ESP32: wrap posix directory functions and wire in file systems. - Moved all platform-specific file system init code to platform subprojects Other - Fix for screenshot capture (issue with paths) - Fixes for coreutils app correctness - Memory optimizations (use more PSRAM where possible) in various locations such as app-module, shell and terminal. - `ls` and `help` commands now use terminal width and show columns of data by default - Created fs helpers at `TactilityKernel/include/tactility/filesystem/fs.h` (partially ported from `ShellFs`)
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
// SPDX-License-Identifier: Apache-2.0
|
|
#include <tactility/error.h>
|
|
|
|
extern "C" {
|
|
|
|
const char* error_to_string(error_t error) {
|
|
switch (error) {
|
|
case ERROR_NONE:
|
|
return "no error";
|
|
case ERROR_UNDEFINED:
|
|
return "undefined";
|
|
case ERROR_INVALID_STATE:
|
|
return "invalid state";
|
|
case ERROR_INVALID_ARGUMENT:
|
|
return "invalid argument";
|
|
case ERROR_MISSING_PARAMETER:
|
|
return "missing parameter";
|
|
case ERROR_NOT_FOUND:
|
|
return "not found";
|
|
case ERROR_ISR_STATUS:
|
|
return "ISR status";
|
|
case ERROR_RESOURCE:
|
|
return "resource";
|
|
case ERROR_TIMEOUT:
|
|
return "timeout";
|
|
case ERROR_OUT_OF_MEMORY:
|
|
return "out of memory";
|
|
case ERROR_NOT_SUPPORTED:
|
|
return "not supported";
|
|
case ERROR_NOT_ALLOWED:
|
|
return "not allowed";
|
|
case ERROR_BUFFER_OVERFLOW:
|
|
return "buffer overflow";
|
|
case ERROR_RESOURCE_BUSY:
|
|
return "resource busy";
|
|
case ERROR_ALREADY_EXISTS:
|
|
return "already exists";
|
|
case ERROR_NOT_EMPTY:
|
|
return "not empty";
|
|
default:
|
|
return "unknown";
|
|
}
|
|
}
|
|
|
|
}
|