2
0

err-to-raise 818 B

12345678910111213141516171819202122
  1. #! /usr/bin/env perl
  2. # Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
  3. #
  4. # Licensed under the Apache License 2.0 (the "License"). You may not use
  5. # this file except in compliance with the License. You can obtain a copy
  6. # in the file LICENSE in the source distribution or at
  7. # https://www.openssl.org/source/license.html
  8. # Run this program like this:
  9. # perl -pi util/err-to-raise files...
  10. # or
  11. # git ls-files | grep '\.c$' | xargs perl -pi util/err-to-raise
  12. # Consider running util/merge-err-lines first, to catch most (all?) of the
  13. # cases where the XXXerr() call is split into two lines.
  14. # Do not use this in engines/, they have their own error reporting functions,
  15. # which do call ERR_raise().
  16. use strict;
  17. use warnings;
  18. s/\b([_A-Z0-9]+)err\(\s*\w+\s*,/ERR_raise(ERR_LIB_$1,/;