ONE - On-device Neural Engine
Loading...
Searching...
No Matches
oops::UserExn Class Reference

Exception to user. More...

#include <UserExn.h>

Collaboration diagram for oops::UserExn:

Public Member Functions

 UserExn ()=delete
 
template<typename... Info>
 UserExn (const std::string &msg, Info &&...args)
 
const char * what () const noexcept override
 

Detailed Description

Exception to user.

Pass msg and one additional info, e.g., ex) UserExn("Unsupported rank", 4); ex) UserExn("Unsupported layout", "NHWC");

Or pass msg with attribute pairs of name & val , ex) UserExn("Node has unsupported layout", "Node", node->name(), "layout", node->layout());

Definition at line 41 of file UserExn.h.

Constructor & Destructor Documentation

◆ UserExn() [1/2]

oops::UserExn::UserExn ( )
delete

◆ UserExn() [2/2]

template<typename... Info>
oops::UserExn::UserExn ( const std::string &  msg,
Info &&...  args 
)
inline

Definition at line 46 of file UserExn.h.

47 {
48 std::stringstream out;
49
50 out << "Error: " << msg + ": ";
51
52 build_info(out, args...);
53
54 _msg = out.str();
55 }
args
Definition infer.py:21

Member Function Documentation

◆ what()

const char * oops::UserExn::what ( ) const
inlineoverridenoexcept

Definition at line 57 of file UserExn.h.

57{ return _msg.c_str(); };

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