assertion.cpp 603 B

123456789101112131415161718192021222324
  1. // This file is part of Desktop App Toolkit,
  2. // a set of libraries for developing nice desktop applications.
  3. //
  4. // For license and copyright information please follow this link:
  5. // https://github.com/desktop-app/legal/blob/master/LEGAL
  6. //
  7. #include "base/assertion.h"
  8. #include "base/integration.h"
  9. namespace base::assertion {
  10. void log(const char *message, const char *file, int line) {
  11. if (Integration::Exists()) {
  12. const auto info = message
  13. + QString(' ')
  14. + file
  15. + ':'
  16. + QString::number(line);
  17. Integration::Instance().logAssertionViolation(info);
  18. }
  19. }
  20. } // namespace base::assertion