Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Qtにはstd::runtime_error(のようQStringに)と同等のクラスがありstd::stringますか?
std::runtime_error
QString
std::string
具体的にstd::runtime_errorは、エラーを説明する文字列を保持するため、次のことができます。
throw std::runtime_error("my error description");
いいえ、Qt は例外を使用しません (スレッド間で例外をスローおよびキャッチするための QtConcurrent::Exception 以外)。標準の C++ 例外クラスを使用するだけです。