2
0

result.c 934 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under both the BSD-style license (found in the
  6. * LICENSE file in the root directory of this source tree) and the GPLv2 (found
  7. * in the COPYING file in the root directory of this source tree).
  8. * You may select, at your option, one of the above-listed licenses.
  9. */
  10. #include "result.h"
  11. char const* result_get_error_string(result_t result) {
  12. switch (result_get_error(result)) {
  13. case result_error_ok:
  14. return "okay";
  15. case result_error_skip:
  16. return "skip";
  17. case result_error_system_error:
  18. return "system error";
  19. case result_error_compression_error:
  20. return "compression error";
  21. case result_error_decompression_error:
  22. return "decompression error";
  23. case result_error_round_trip_error:
  24. return "round trip error";
  25. }
  26. }