Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions
c10::Error Class Reference

The primary ATen error class. More...

#include <Exception.h>

Inheritance diagram for c10::Error:
c10::IndexError torch::autograd::NotImplemented

Public Member Functions

 Error (const std::string &msg, const std::string &backtrace, const void *caller=nullptr)
 
 Error (SourceLocation source_location, const std::string &msg)
 
 Error (const char *file, const uint32_t line, const char *condition, const std::string &msg, const std::string &backtrace, const void *caller=nullptr)
 
void AppendMessage (const std::string &msg)
 
std::string msg () const
 
std::string msg_without_backtrace () const
 
const std::vector< std::string > & msg_stack () const
 
const char * what () const noexceptoverride
 Returns the complete error message, including the source location.
 
const void * caller () const noexcept
 
const char * what_without_backtrace () const noexcept
 Returns only the error message string, without source location.
 

Detailed Description

The primary ATen error class.

Provides a complete error message with source location information via what(), and a more concise message via what_without_backtrace(). Should primarily be used with the AT_ERROR macro.

NB: c10::Error is handled specially by the default torch to suppress the backtrace, see torch/csrc/Exceptions.h

Definition at line 27 of file Exception.h.


The documentation for this class was generated from the following files: