Macros
standard_errors.h File Reference
#include <stdexcept>

Go to the source code of this file.

Macros

#define ECVL_ERROR_MSG   "[Error]: "
 
#define ECVL_WARNING_MSG   "[Warning]: "
 
#define ECVL_ERROR_NOT_IMPLEMENTED   throw std::runtime_error(ECVL_ERROR_MSG "Not implemented");
 
#define ECVL_ERROR_NOT_IMPLEMENTED_WHAT(what)   throw std::runtime_error(ECVL_ERROR_MSG what " not implemented");
 
#define ECVL_ERROR_NOT_REACHABLE_CODE   throw std::runtime_error(ECVL_ERROR_MSG "How did you get here?");
 
#define ECVL_ERROR_WRONG_PARAMS(msg)   throw std::runtime_error(ECVL_ERROR_MSG "Wrong parameters - " msg);
 
#define ECVL_ERROR_NOT_ALLOWED_ON_NON_OWING_IMAGE(...)   throw std::runtime_error(ECVL_ERROR_MSG "Operation not allowed on non-owning Image" __VA_ARGS__);
 
#define ECVL_ERROR_UNSUPPORTED_OPENCV_DEPTH   throw std::runtime_error(ECVL_ERROR_MSG "Unsupported OpenCV depth");
 
#define ECVL_ERROR_UNSUPPORTED_OPENCV_DIMS   throw std::runtime_error(ECVL_ERROR_MSG "Unsupported OpenCV dimensions");
 
#define ECVL_ERROR_UNSUPPORTED_SRC_DATATYPE   throw std::runtime_error(ECVL_ERROR_MSG "The src DataType is not supported by this function");
 
#define ECVL_ERROR_UNSUPPORTED_SRC_COLORTYPE   throw std::runtime_error(ECVL_ERROR_MSG "The src ColorType is not supported by this function");
 
#define ECVL_ERROR_EMPTY_IMAGE   throw std::runtime_error(ECVL_ERROR_MSG "Empty image provided");
 
#define ECVL_ERROR_NOT_ALLOWED_ON_UNSIGNED_IMG   throw std::runtime_error(ECVL_ERROR_MSG "Operation not allowed on unsigned Image");
 
#define ECVL_ERROR_DIVISION_BY_ZERO   throw std::runtime_error(ECVL_ERROR_MSG "Division by zero is not allowed.");
 
#define ECVL_ERROR_FILE_DOES_NOT_EXIST   throw std::runtime_error(ECVL_ERROR_MSG "File does not exist");
 
#define ECVL_ERROR_SPLIT_DOES_NOT_EXIST   throw std::runtime_error(ECVL_ERROR_MSG "This split does not exist in the dataset file");
 
#define ECVL_ERROR_CANNOT_LOAD_FROM_URL   throw std::runtime_error(ECVL_ERROR_MSG "Cannot load from URL");
 
#define ECVL_ERROR_CANNOT_LOAD_IMAGE   throw std::runtime_error(ECVL_ERROR_MSG "Cannot load image");
 
#define ECVL_ERROR_INCOMPATIBLE_DIMENSIONS   throw std::runtime_error(ECVL_ERROR_MSG "Incompatible dimensions");
 
#define ECVL_ERROR_DIFFERENT_DEVICES   throw std::runtime_error(ECVL_ERROR_MSG "src and dst are in different devices");
 
#define ECVL_ERROR_DEVICE_UNAVAILABLE(device)   throw std::runtime_error(ECVL_ERROR_MSG #device " device unavailable");
 
#define ECVL_ERROR_MOVING_IMAGE(str, device)   throw std::runtime_error(ECVL_ERROR_MSG "Cannot move " #str " " #device);
 

Macro Definition Documentation

◆ ECVL_ERROR_CANNOT_LOAD_FROM_URL

#define ECVL_ERROR_CANNOT_LOAD_FROM_URL   throw std::runtime_error(ECVL_ERROR_MSG "Cannot load from URL");

Definition at line 36 of file standard_errors.h.

◆ ECVL_ERROR_CANNOT_LOAD_IMAGE

#define ECVL_ERROR_CANNOT_LOAD_IMAGE   throw std::runtime_error(ECVL_ERROR_MSG "Cannot load image");

Definition at line 37 of file standard_errors.h.

◆ ECVL_ERROR_DEVICE_UNAVAILABLE

#define ECVL_ERROR_DEVICE_UNAVAILABLE (   device)    throw std::runtime_error(ECVL_ERROR_MSG #device " device unavailable");

Definition at line 40 of file standard_errors.h.

◆ ECVL_ERROR_DIFFERENT_DEVICES

#define ECVL_ERROR_DIFFERENT_DEVICES   throw std::runtime_error(ECVL_ERROR_MSG "src and dst are in different devices");

Definition at line 39 of file standard_errors.h.

◆ ECVL_ERROR_DIVISION_BY_ZERO

#define ECVL_ERROR_DIVISION_BY_ZERO   throw std::runtime_error(ECVL_ERROR_MSG "Division by zero is not allowed.");

Definition at line 33 of file standard_errors.h.

◆ ECVL_ERROR_EMPTY_IMAGE

#define ECVL_ERROR_EMPTY_IMAGE   throw std::runtime_error(ECVL_ERROR_MSG "Empty image provided");

Definition at line 31 of file standard_errors.h.

◆ ECVL_ERROR_FILE_DOES_NOT_EXIST

#define ECVL_ERROR_FILE_DOES_NOT_EXIST   throw std::runtime_error(ECVL_ERROR_MSG "File does not exist");

Definition at line 34 of file standard_errors.h.

◆ ECVL_ERROR_INCOMPATIBLE_DIMENSIONS

#define ECVL_ERROR_INCOMPATIBLE_DIMENSIONS   throw std::runtime_error(ECVL_ERROR_MSG "Incompatible dimensions");

Definition at line 38 of file standard_errors.h.

◆ ECVL_ERROR_MOVING_IMAGE

#define ECVL_ERROR_MOVING_IMAGE (   str,
  device 
)    throw std::runtime_error(ECVL_ERROR_MSG "Cannot move " #str " " #device);

Definition at line 41 of file standard_errors.h.

◆ ECVL_ERROR_MSG

#define ECVL_ERROR_MSG   "[Error]: "

Definition at line 19 of file standard_errors.h.

◆ ECVL_ERROR_NOT_ALLOWED_ON_NON_OWING_IMAGE

#define ECVL_ERROR_NOT_ALLOWED_ON_NON_OWING_IMAGE (   ...)    throw std::runtime_error(ECVL_ERROR_MSG "Operation not allowed on non-owning Image" __VA_ARGS__);

Definition at line 26 of file standard_errors.h.

◆ ECVL_ERROR_NOT_ALLOWED_ON_UNSIGNED_IMG

#define ECVL_ERROR_NOT_ALLOWED_ON_UNSIGNED_IMG   throw std::runtime_error(ECVL_ERROR_MSG "Operation not allowed on unsigned Image");

Definition at line 32 of file standard_errors.h.

◆ ECVL_ERROR_NOT_IMPLEMENTED

#define ECVL_ERROR_NOT_IMPLEMENTED   throw std::runtime_error(ECVL_ERROR_MSG "Not implemented");

Definition at line 22 of file standard_errors.h.

◆ ECVL_ERROR_NOT_IMPLEMENTED_WHAT

#define ECVL_ERROR_NOT_IMPLEMENTED_WHAT (   what)    throw std::runtime_error(ECVL_ERROR_MSG what " not implemented");

Definition at line 23 of file standard_errors.h.

◆ ECVL_ERROR_NOT_REACHABLE_CODE

#define ECVL_ERROR_NOT_REACHABLE_CODE   throw std::runtime_error(ECVL_ERROR_MSG "How did you get here?");

Definition at line 24 of file standard_errors.h.

◆ ECVL_ERROR_SPLIT_DOES_NOT_EXIST

#define ECVL_ERROR_SPLIT_DOES_NOT_EXIST   throw std::runtime_error(ECVL_ERROR_MSG "This split does not exist in the dataset file");

Definition at line 35 of file standard_errors.h.

◆ ECVL_ERROR_UNSUPPORTED_OPENCV_DEPTH

#define ECVL_ERROR_UNSUPPORTED_OPENCV_DEPTH   throw std::runtime_error(ECVL_ERROR_MSG "Unsupported OpenCV depth");

Definition at line 27 of file standard_errors.h.

◆ ECVL_ERROR_UNSUPPORTED_OPENCV_DIMS

#define ECVL_ERROR_UNSUPPORTED_OPENCV_DIMS   throw std::runtime_error(ECVL_ERROR_MSG "Unsupported OpenCV dimensions");

Definition at line 28 of file standard_errors.h.

◆ ECVL_ERROR_UNSUPPORTED_SRC_COLORTYPE

#define ECVL_ERROR_UNSUPPORTED_SRC_COLORTYPE   throw std::runtime_error(ECVL_ERROR_MSG "The src ColorType is not supported by this function");

Definition at line 30 of file standard_errors.h.

◆ ECVL_ERROR_UNSUPPORTED_SRC_DATATYPE

#define ECVL_ERROR_UNSUPPORTED_SRC_DATATYPE   throw std::runtime_error(ECVL_ERROR_MSG "The src DataType is not supported by this function");

Definition at line 29 of file standard_errors.h.

◆ ECVL_ERROR_WRONG_PARAMS

#define ECVL_ERROR_WRONG_PARAMS (   msg)    throw std::runtime_error(ECVL_ERROR_MSG "Wrong parameters - " msg);

Definition at line 25 of file standard_errors.h.

◆ ECVL_WARNING_MSG

#define ECVL_WARNING_MSG   "[Warning]: "

Definition at line 20 of file standard_errors.h.