21 Exception(BString description
)
23 fDescription(description
)
28 Exception(const char* format
,...)
33 va_start(args
, format
);
34 SetTo(B_OK
, format
, args
);
39 Exception(status_t error
)
46 Exception(status_t error
, BString description
)
48 fDescription(description
)
53 Exception(status_t error
, const char* format
,...)
58 va_start(args
, format
);
59 SetTo(error
, format
, args
);
64 Exception(const Exception
& exception
)
65 : fError(exception
.fError
),
66 fDescription(exception
.fDescription
)
76 void SetTo(status_t error
, BString description
)
79 fDescription
.SetTo(description
);
83 void SetTo(status_t error
, const char* format
, va_list arg
)
86 vsprintf(buffer
, format
, arg
);
87 SetTo(error
, BString(buffer
));
91 status_t
GetError() const
97 const char* GetDescription() const
99 return fDescription
.String();
104 BString fDescription
;
107 #endif // EXCEPTION_H