static void UI_ReportCaughtException(KonohaContext *kctx, kException *e, KonohaStack *bottomStack, KonohaStack *topStack) { const char *exceptionName; const char *optionalMessage; int fault; KonohaStack *sfp; KBuffer wb; DBG_ASSERT(IS_Exception(e)); exceptionName = KSymbol_text(e->symbol); optionalMessage = kString_text(e->Message); fault = e->fault; PLATAPI printf_i("%s", BeginTag(kctx, ErrTag)); if(optionalMessage != NULL && optionalMessage[0] != 0) { PLATAPI printf_i("%s: SoftwareFault %s", exceptionName, optionalMessage); } else { PLATAPI printf_i("%s:", exceptionName); if(KFlag_Is(int, fault, SoftwareFault)) { PLATAPI printf_i(" SoftwareFault"); } if(KFlag_Is(int, fault, UserFault)) { PLATAPI printf_i(" UserFault"); }
static void UI_ReportUserMessage(KonohaContext *kctx, kinfotag_t level, kfileline_t pline, const char *msg, int isNewLine) { const char *beginTag = BeginTag(kctx, level); const char *endTag = EndTag(kctx, level); const char *kLF = isNewLine ? "\n" : ""; if(pline > 0) { const char *file = KFileLine_textFileName(pline); PLATAPI printf_i("%s - (%s:%d) %s%s%s" , beginTag, PLATAPI shortFilePath(file), (kushort_t)pline, msg, kLF, endTag); } else { PLATAPI printf_i("%s%s%s%s", beginTag, msg, kLF, endTag); } }
static void UI_ReportCompilerMessage(KonohaContext *kctx, kinfotag_t taglevel, kfileline_t pline, const char *msg) { const char *beginTag = BeginTag(kctx, taglevel); const char *endTag = EndTag(kctx, taglevel); PLATAPI printf_i("%s - %s%s\n", beginTag, msg, endTag); }
void WgResourceSerializerXML::BeginTag(const std::string& tagName) { BeginTag(tagName, tagName.c_str()); }