summaryrefslogtreecommitdiff
path: root/public/include/XMPCommon/source/IErrorNotifier.cpp
blob: abd8867c92da10764f23e49e835b389c1adeec35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// =================================================================================================
// Copyright Adobe
// Copyright 2015 Adobe
// All Rights Reserved
//
// NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
// of the Adobe license agreement accompanying it. If you have received this file from a source other 
// than Adobe, then your use, modification, or distribution of it requires the prior written permission
// of Adobe.
// =================================================================================================

#include "XMPCommon/Interfaces/IErrorNotifier.h"
#include "XMPCommon/Interfaces/IError.h"

namespace AdobeXMPCommon {
	uint32 APICALL IErrorNotifier_v1::notify( pcIError_base error, uint32 & exceptionThrown ) __NOTHROW__ {
		exceptionThrown = 0;
		bool retValue( false );
		try {
			retValue = Notify( IError::MakeShared( error ) );
		} catch ( ... ) {
			exceptionThrown = 1;
		}
		return retValue ? 1 : 0;
	}

}