https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119116
Bug ID: 119116 Summary: std::use_facet exception message needs more details Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: programmingkidx at gmail dot com Target Milestone: --- Currently when std:: use_facet() throws a bad_cast exception, the only message we will see from the what() function is "std::bad_cast". I ask that this message be enhanced to include more helpful debug messages like these: - has_facet returned false - facet id too big - facet id equal to zero With any of these messages the exception's what() message should include the info that use_facet() is what threw the exception. This could be an example message: use_facet() has thrown a std::bad_cast reason: has_facet returned false