简体   繁体   中英

Qt std::runtime_error equivalent

Does Qt have a class equivalent to std::runtime_error (like QString is equivalent to std::string )?

Specifically, std::runtime_error holds a string describing the error, so you can just do:

throw std::runtime_error("my error description");

不,Qt不使用异常(除了QtConcurrent :: Exception以外,它跨线程引发和捕获异常。)仅使用标准的C ++异常类。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM