2025-04-02 02:02:51 +02:00
|
|
|
#include <string>
|
2025-04-02 02:43:03 +02:00
|
|
|
#include <log/log.h>
|
2025-04-02 02:02:51 +02:00
|
|
|
|
|
|
|
namespace android::hardware::details {
|
|
|
|
void check(bool exp) {
|
2025-04-02 02:43:03 +02:00
|
|
|
ALOGE_IF(!exp, "Check failed");
|
2025-04-02 02:02:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void check(bool exp, const char* message) {
|
2025-04-02 02:43:03 +02:00
|
|
|
ALOGE_IF(!exp, "%s", message);
|
2025-04-02 02:02:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void logError(const std::string &message) {
|
2025-04-02 02:43:03 +02:00
|
|
|
ALOGE("%s", message.c_str());
|
2025-04-02 02:02:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void errorWriteLog(int tag, const char* info) {
|
2025-04-02 02:43:03 +02:00
|
|
|
ALOGE("%d: %s", tag, info);
|
2025-04-02 02:02:51 +02:00
|
|
|
}
|
|
|
|
} // namespace android::hardware::details
|