github 上にある MMDAI と MMDAI2 (VPVM) のミラーです
Révision | 920f9b197b08bea38111f6edb436c8ce80b39cde (tree) |
---|---|
l'heure | 2014-04-05 18:00:01 |
Auteur | hkrn <hikarin.jp@gmai...> |
Commiter | hkrn |
forgot to add CrashReporter.mm to VPMM
@@ -0,0 +1,54 @@ | ||
1 | +/** | |
2 | + | |
3 | + Copyright (c) 2010-2014 hkrn | |
4 | + | |
5 | + All rights reserved. | |
6 | + | |
7 | + Redistribution and use in source and binary forms, with or | |
8 | + without modification, are permitted provided that the following | |
9 | + conditions are met: | |
10 | + | |
11 | + - Redistributions of source code must retain the above copyright | |
12 | + notice, this list of conditions and the following disclaimer. | |
13 | + - Redistributions in binary form must reproduce the above | |
14 | + copyright notice, this list of conditions and the following | |
15 | + disclaimer in the documentation and/or other materials provided | |
16 | + with the distribution. | |
17 | + - Neither the name of the MMDAI project team nor the names of | |
18 | + its contributors may be used to endorse or promote products | |
19 | + derived from this software without specific prior written | |
20 | + permission. | |
21 | + | |
22 | + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND | |
23 | + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | |
24 | + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
25 | + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
26 | + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS | |
27 | + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | |
28 | + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | |
29 | + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
30 | + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |
31 | + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | |
32 | + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
33 | + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
34 | + POSSIBILITY OF SUCH DAMAGE. | |
35 | + | |
36 | +*/ | |
37 | + | |
38 | +#include <CrashReporter.h> | |
39 | +#include <vpvl2/Common.h> | |
40 | +#include "Preference.h" | |
41 | + | |
42 | +using namespace vpvl2; | |
43 | + | |
44 | +void installCrashReporter(const Preference &preference) | |
45 | +{ | |
46 | + Q_UNUSED(preference); | |
47 | + PLCrashReporterConfig *config = [[[PLCrashReporterConfig alloc] initWithSignalHandlerType:PLCrashReporterSignalHandlerTypeMach | |
48 | + symbolicationStrategy:PLCrashReporterSymbolicationStrategyAll] autorelease]; | |
49 | + PLCrashReporter *reporter = [[[PLCrashReporter alloc] initWithConfiguration:config] autorelease]; | |
50 | + NSError *error = nil; | |
51 | + if (![reporter enableCrashReporterAndReturnError:&error]) { | |
52 | + VPVL2_LOG(WARNING, "Could not enable crash reporter: " << [[error localizedDescription] UTF8String]); | |
53 | + } | |
54 | +} |