Files
pytorch/torch/csrc/jit/runtime/jit_exception.cpp
Pavithran Ramachandran bf69a61293 (1/2) Make TorchScript Preserve Fully Qualified Class Name for Python Exceptions: backend change
Summary: Reland for D33282878 (911d527b87) . Land backend change first to maintain FC. Will wait for 2 weeks after this diff is in. And than land the front-end change in next diff.

Test Plan:
test in next diff

time buck test mode/dev-nosan fblearner/flow/projects/langtech/translation:tests -- test_e2e_base_training

Reviewed By: gmagogsfm

Differential Revision: D33342547

fbshipit-source-id: b3dee9a4bdfd78103848c12629e5fccafdd621e3
(cherry picked from commit ae1935f1af755180e5607e870ff365dc17061e4a)
2022-01-27 03:29:40 +00:00

14 lines
322 B
C++

#include <torch/csrc/jit/runtime/jit_exception.h>
namespace torch {
namespace jit {
JITException::JITException(
const std::string& msg,
c10::optional<std::string> python_class_name)
: std::runtime_error(msg),
python_class_name_(std::move(python_class_name)) {}
} // namespace jit
} // namespace torch