|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 using System; |
|
18 using System.Collections.Generic; |
|
19 using System.Text; |
|
20 using CrashAnalyserEngine.Engine; |
|
21 using CrashAnalyserEngine.Plugins; |
|
22 using SymbianUtils.FileSystem; |
|
23 using SymbianUtils.FileSystem.Utilities; |
|
24 |
|
25 namespace CrashAnalyserConsole |
|
26 { |
|
27 class EntryPoint |
|
28 { |
|
29 static int Main( string[] aArguments ) |
|
30 { |
|
31 int error = 0; |
|
32 // |
|
33 using ( FSLog log = new FSLog( true ) ) |
|
34 { |
|
35 try |
|
36 { |
|
37 FSUtilities.ClearTempPath(); |
|
38 // |
|
39 CACommandLineUI commandLineUi = new CACommandLineUI( aArguments, log ); |
|
40 error = commandLineUi.Run(); |
|
41 // |
|
42 if ( error != CrashAnalyserEngine.Plugins.CAPlugin.KErrCommandLineNone ) |
|
43 { |
|
44 SymbianUtils.SymDebug.SymDebugger.Break(); |
|
45 } |
|
46 } |
|
47 catch ( Exception e ) |
|
48 { |
|
49 log.TraceAlways( "CrashAnalyserConsole.Main() - EXCEPTION: " + e.Message ); |
|
50 log.TraceAlways( "CrashAnalyserConsole.Main() - STACK: " + e.StackTrace ); |
|
51 SymbianUtils.SymDebug.SymDebugger.Break(); |
|
52 error = -1; |
|
53 } |
|
54 // |
|
55 if ( error != 0 ) |
|
56 { |
|
57 log.TraceAlways( "CA completed with error: " + error ); |
|
58 } |
|
59 } |
|
60 |
|
61 if ( System.Diagnostics.Debugger.IsAttached ) |
|
62 { |
|
63 System.Console.Write( "PRESS ANY KEY" ); |
|
64 System.Console.ReadKey(); |
|
65 } |
|
66 // |
|
67 return error; |
|
68 } |
|
69 } |
|
70 } |