24 Exception(BString description
)
26 fDescription(description
)
31 Exception(const char* format
,...)
36 va_start(args
, format
);
37 SetTo(B_OK
, format
, args
);
42 Exception(status_t error
)
49 Exception(status_t error
, BString description
)
51 fDescription(description
)
56 Exception(status_t error
, const char* format
,...)
61 va_start(args
, format
);
62 SetTo(error
, format
, args
);
67 Exception(const Exception
& exception
)
68 : fError(exception
.fError
),
69 fDescription(exception
.fDescription
)
79 void SetTo(status_t error
, BString description
)
82 fDescription
.SetTo(description
);
86 void SetTo(status_t error
, const char* format
, va_list arg
)
89 vsprintf(buffer
, format
, arg
);
90 SetTo(error
, BString(buffer
));
94 status_t
Error() const
100 const char* Description() const
102 return fDescription
.String();
107 BString fDescription
;
110 }; // namespace Storage
111 }; // namespace BPrivate
113 #endif // _EXCEPTION_H