1 // Copyright 2005 Ben Hutchings <ben@decadent.org.uk>.
2 // See the file "COPYING" for licence details.
4 #ifndef INC_XPCOM_SUPPORT_HPP
5 #define INC_XPCOM_SUPPORT_HPP
11 namespace xpcom_support
13 void throw_exception(nsresult error);
15 inline nsresult check(nsresult result)
17 if (NS_FAILED(result))
18 throw_exception(result);
23 #endif // !INC_XPCOM_SUPPORT_HPP