2 * Worldvisions Weaver Software:
3 * Copyright (C) 2005 Net Integration Technologies, Inc.
5 * Helper classes and functions to add more information to WvCrashes.
10 WvCrashWill::WvCrashWill(const char *will
)
11 : old_will(wvcrash_read_will())
13 wvcrash_leave_will(will
);
16 WvCrashWill::WvCrashWill(WVSTRING_FORMAT_DEFN
)
17 : old_will(wvcrash_read_will())
19 // We use a WvFastString here, because it is a temporary. init()
20 // will duplicate the string into a local buffer, so don't you
22 wvcrash_leave_will(WvFastString(WVSTRING_FORMAT_CALL
));
25 void WvCrashWill::rewrite(const char *will
)
27 // Don't touch old_will.
28 wvcrash_leave_will(will
);
31 void WvCrashWill::rewrite(WVSTRING_FORMAT_DEFN
)
33 // Again, since wvcrash_leave_will will duplicate the string, we
34 // can use a WvFastString.
35 rewrite(WvFastString(WVSTRING_FORMAT_CALL
));
38 WvCrashWill::~WvCrashWill()
40 // Put the old will back.
41 wvcrash_leave_will(old_will
);