assert.c 492 B

123456789101112131415161718
  1. /**
  2. * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. * SPDX-License-Identifier: Apache-2.0.
  4. */
  5. #include <aws/common/common.h>
  6. #include <aws/common/system_info.h>
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. void aws_fatal_assert(const char *cond_str, const char *file, int line) {
  10. aws_debug_break();
  11. fprintf(stderr, "Fatal error condition occurred in %s:%d: %s\nExiting Application\n", file, line, cond_str);
  12. aws_backtrace_print(stderr, NULL);
  13. abort();
  14. }