Talk:L4Re error handling: Difference between revisions
From TUDOS-Wiki
Jump to navigationJump to search
m internal l4re doc url has changed |
|||
(One intermediate revision by the same user not shown) | |||
Line 19: | Line 19: | ||
** many methods to check for more or less specific errors | ** many methods to check for more or less specific errors | ||
** '''TODO''' talk to someone, grep code | ** '''TODO''' talk to someone, grep code | ||
** [http://os.inf.tu-dresden.de/~l4check/l4re/doc/html/group__l4__msgtag__api.html Message Tag] l4_msgtag_has_error and more | ** [http://os.inf.tu-dresden.de/~l4check/l4re/doc/internal/html/group__l4__msgtag__api.html Message Tag] l4_msgtag_has_error and more | ||
** [http://os.inf.tu-dresden.de/~l4check/l4re/doc/html/group__l4__ipc__err__api.html Error handling] l4_ipc_error, l4_error and more specific ones, most specific seams to be l4_ipc_error_code | ** [http://os.inf.tu-dresden.de/~l4check/l4re/doc/internal/html/group__l4__ipc__err__api.html Error handling] l4_ipc_error, l4_error and more specific ones, most specific seams to be l4_ipc_error_code | ||
** how to handle: log! depends on specific error. often task configuration error, so end task or don't provide feature | ** how to handle: log! depends on specific error. often task configuration error, so end task or don't provide feature | ||
* [http://os.inf.tu-dresden.de/~l4check/l4re/doc/html/group__l4cxx__exceptions.html C++ Exceptions] | * [http://os.inf.tu-dresden.de/~l4check/l4re/doc/internal/html/group__l4cxx__exceptions.html C++ Exceptions] | ||
** chksys for l4_msgtag_t and long | ** chksys for l4_msgtag_t and long | ||
** chkcap for Cap<T> | ** chkcap for Cap<T> | ||
Line 31: | Line 31: | ||
** exceptions can be printed with std::ostream | ** exceptions can be printed with std::ostream | ||
** you can put try { } catch(e) { std::cerr << e } in your thread functions like main | ** you can put try { } catch(e) { std::cerr << e } in your thread functions like main | ||
** useful usage seen in mag/server/src/main.cc | |||
Latest revision as of 13:33, 26 July 2012
DRAFT
- interresting files ./l4sys/include/err.h, ./l4util/include/assert.h, ./l4re/include/error_helper, ./l4sys/lib/src/errtostr.c, ./cxx/lib/util/src/ipc_error_str.cc, ./cxx/lib/base/include/exceptions, ./cxx/lib/base/include/std_exc_io, ./moe/server/src/exception.cc, ./moe/server/src/exception.h, many files containing "debug", ./l4sys/include/ARCH-*/kdebug.h
- BD: JDB, the kernel debugger, could be relevant in so far that you could mention enter_kdebug().
- usage: enter_kdebug("some message which helps others to find this call and see some state");
- enters jdb, prints this message
- NO jdb documentation at this time and place (BD: do you mean there's no documentation available? The basics in http://os.inf.tu-dresden.de/fiasco/doc/jdb.pdf are still valid.)
- common types which can represent error conditions: l4_cap_idx_t, Cap, l4_msgtag_t
- l4_cap_idx_t and Cap are very similar, cause Cap is a wrapper for l4_cap_idx_t
- can be invalid
- check l4_cap_idx_t with l4_is_invalid_cap and l4_is_valid_cap
- check Cap with L4::Cap_base::is_valid
- TODO where and when do we use L4::Cap_base::validate?
- how to handle? log! also: don't support the feature which needs access to this capability... generally this means end the task
- l4_msgtag_t
- some error conditions
- many methods to check for more or less specific errors
- TODO talk to someone, grep code
- Message Tag l4_msgtag_has_error and more
- Error handling l4_ipc_error, l4_error and more specific ones, most specific seams to be l4_ipc_error_code
- how to handle: log! depends on specific error. often task configuration error, so end task or don't provide feature
- C++ Exceptions
- chksys for l4_msgtag_t and long
- chkcap for Cap<T>
- throw some L4::Base_exception
- has a method returning a "human readable" string! L4::Base_exception::str
- exceptions can be printed with std::ostream
- you can put try { } catch(e) { std::cerr << e } in your thread functions like main
- useful usage seen in mag/server/src/main.cc
- ./l4sys/lib/src/errtostr.c
- l4sys_errtostr(long) for L4_E* and L4_IPC_* constants
- ./cxx/lib/util/src/ipc_error_str.cc
- TODO too funny
- TODO grep for usage