debugwriteln.d 537 B

1234567891011121314151617181920212223242526272829
  1. module system.debugwriteln;
  2. import std.stdio;
  3. import core.stdc.stdio;
  4. import core.stdc.stdarg;
  5. nothrow void debugWriteln(A...)(A args)
  6. {
  7. debug
  8. {
  9. try
  10. {
  11. writeln("INFO: ENGINE: ", args);
  12. }
  13. catch (Exception e)
  14. {
  15. debugWriteln("ERROR:", e.msg);
  16. }
  17. }
  18. }
  19. extern(C) void overlayDebugWriteln(const(char)* format, ...) {
  20. printf("INFO: OVERLAY: ");
  21. va_list args;
  22. va_start(args, format);
  23. vprintf(format, args);
  24. va_end(args);
  25. printf("\n");
  26. }