ERR_set_mark.pod 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. =pod
  2. =head1 NAME
  3. ERR_set_mark, ERR_clear_last_mark, ERR_pop_to_mark, ERR_count_to_mark, ERR_pop -
  4. set mark, clear mark, pop errors until mark and pop last error
  5. =head1 SYNOPSIS
  6. #include <openssl/err.h>
  7. int ERR_set_mark(void);
  8. int ERR_pop_to_mark(void);
  9. int ERR_clear_last_mark(void);
  10. int ERR_count_to_mark(void);
  11. int ERR_pop(void);
  12. =head1 DESCRIPTION
  13. ERR_set_mark() sets a mark on the current topmost error record if there
  14. is one.
  15. ERR_pop_to_mark() will pop the top of the error stack until a mark is found.
  16. The mark is then removed. If there is no mark, the whole stack is removed.
  17. ERR_clear_last_mark() removes the last mark added if there is one.
  18. ERR_count_to_mark() returns the number of entries on the error stack above the
  19. most recently marked entry, not including that entry. If there is no mark in the
  20. error stack, the number of entries in the error stack is returned.
  21. ERR_pop() unconditionally pops a single error entry from the top of the error
  22. stack (which is the entry obtainable via L<ERR_peek_last_error(3)>).
  23. =head1 RETURN VALUES
  24. ERR_set_mark() returns 0 if the error stack is empty, otherwise 1.
  25. ERR_clear_last_mark() and ERR_pop_to_mark() return 0 if there was no mark in the
  26. error stack, which implies that the stack became empty, otherwise 1.
  27. ERR_count_to_mark() returns the number of error stack entries found above the
  28. most recent mark, if any, or the total number of error stack entries.
  29. ERR_pop() returns 1 if an error was popped or 0 if the error stack was empty.
  30. =head1 HISTORY
  31. ERR_pop() was added in OpenSSL 3.3.
  32. =head1 COPYRIGHT
  33. Copyright 2003-2023 The OpenSSL Project Authors. All Rights Reserved.
  34. Licensed under the Apache License 2.0 (the "License"). You may not use
  35. this file except in compliance with the License. You can obtain a copy
  36. in the file LICENSE in the source distribution or at
  37. L<https://www.openssl.org/source/license.html>.
  38. =cut