Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,13 @@ void mono_doorstop_bootstrap(void *mono_domain) {
LOG("Error invoking code!");
if (mono.object_to_string) {
void *str = mono.object_to_string(exc, NULL);
#ifdef UNICODE
char_t *exc_str = mono.string_chars(str);
LOG("Error message: %s", exc_str);
#else
char *exc_str = mono.string_to_utf8(str);
LOG("Error message: %s", exc_str);
#endif
}
}
LOG("Done");
Expand Down
3 changes: 3 additions & 0 deletions src/runtimes/mono.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ DEF_CALL(void, config_parse, const char *filename)
DEF_CALL(void, set_assemblies_path, const char *path)
DEF_CALL(void *, object_to_string, void *obj, void **exc)
DEF_CALL(char *, string_to_utf8, void *s)
#ifdef UNICODE
DEF_CALL(char_t *, string_chars, void *mono_string)
#endif
DEF_CALL(void *, image_open_from_data_with_name, void *data,
unsigned long data_len, int need_copy, MonoImageOpenStatus *status,
int refonly, const char *name)
Expand Down