You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

de_error.h 1.3 kB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Copyright 2019 Huawei Technologies Co., Ltd
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef DATASET_UTIL_DE_ERROR_H_
  17. #define DATASET_UTIL_DE_ERROR_H_
  18. #ifdef DEBUG
  19. #include <cassert>
  20. #define DS_ASSERT(f) assert(f)
  21. #else
  22. #define DS_ASSERT(f) ((void)0)
  23. #endif
  24. #include <map>
  25. #include "utils/error_code.h"
  26. namespace mindspore {
  27. namespace dataset {
  28. DE_ERRORNO_DATASET(CATCH_EXCEPTION, 0, "try catch exception error");
  29. DE_ERRORNO_DATASET(FILE_NOT_FOUND, 1, "file is not found");
  30. DE_ERRORNO_DATASET(PARSE_FAILED, 2, "parse failed");
  31. DE_ERRORNO_DATASET(COPY_ERROR, 3, "copy data error");
  32. DE_ERRORNO_DATASET(BOUND_ERROR, 4, "variable overflow or lost of precision");
  33. DE_ERRORNO_DATASET(ALLOC_FAILED, 5, "dynamic memory allocation failed");
  34. } // namespace dataset
  35. } // namespace mindspore
  36. #endif // DATASET_UTIL_DE_ERROR_H_