Opened 12 years ago

Closed 12 years ago

#4211 closed Patches (fixed)

unsupported_class_version should report relevant class name

Reported by: kab@… Owned by: Robert Ramey
Milestone: Boost 1.43.0 Component: serialization
Version: Boost 1.44.0 Severity: Problem
Keywords: Cc:

Description

The attached patch changes the constructor for archive_exception handling of the unsupported_class_version code, treating the optional second argument as the name of the class. The sole caller of this function with that code passes the relevant class name as that optional second argument. Fixing this might help someone else avoid wasting a bunch of time looking in the wrong place for a bug in their code.

Change History (3)

in reply to:  description comment:1 by kab@…, 12 years ago

Trac doesn't seem to be accepting attachments right now. The change is quite simple, so I'll just put it here in-line:

libs/serialization/src/archive_exception.cpp -- boost 1.43 release

case unsupported_class_version:

  • m_msg = "class version";

+ m_msg = "class version "; + m_msg += (NULL != e1) ? e1 : "<unknown class>";

break;

case other_exception:

comment:2 by anonymous, 12 years ago

Sigh, wiki formatting pretty much trashed that. Trying again.

     case unsupported_class_version:
-        m_msg = "class version";
+        m_msg = "class version ";
+        m_msg += (NULL != e1) ? e1 : "<unknown class>";
         break;
     case other_exception:

comment:3 by Robert Ramey, 12 years ago

Resolution: fixed
Status: newclosed

fixed on my version - migration to trunk on passing local test

Note: See TracTickets for help on using tickets.