各种有用的erlang行为
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 rivejä
516 B

  1. -ifndef(genGbh_H).
  2. -define(genGbh_H, true).
  3. -record(gbhOpts, {
  4. daemon = false :: boolean() %% 是否是守护进程模式 try catch 捕捉到出错之后 是否关闭进程 还是仅仅打印日志 调用、handleError
  5. }).
  6. -ifdef(debug_gbh).
  7. %% debug 调试相关宏定义
  8. -define(NOT_DEBUG, []).
  9. -define(SYS_DEBUG(Debug, Name, Msg),
  10. case Debug of
  11. ?NOT_DEBUG ->
  12. ok;
  13. _ ->
  14. sys:handle_debug(Debug, fun print_event/3, Name, Msg)
  15. end).
  16. -else.
  17. -define(SYS_DEBUG(Debug, Name, Msg), ok).
  18. -endif.
  19. -endif.