|
1 /* |
|
2 * Copyright (c) 2008 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 |
|
18 package com.nokia.s60tools.crashanalyser.containers; |
|
19 |
|
20 /** |
|
21 * A class which represents one error in error library. |
|
22 * An error can be a panic, category, error or exception. |
|
23 * |
|
24 */ |
|
25 public class ErrorLibraryError { |
|
26 |
|
27 String errorName; |
|
28 String errorDescription; |
|
29 public static enum ErrorType {ERROR, PANIC, CATEGORY, EXCEPTION} |
|
30 |
|
31 /** |
|
32 * Constructor |
|
33 * @param name error name |
|
34 * @param description error description |
|
35 */ |
|
36 public ErrorLibraryError(String name, String description) { |
|
37 errorName = name; |
|
38 errorDescription = description; |
|
39 } |
|
40 |
|
41 /** |
|
42 * Constructor |
|
43 */ |
|
44 public ErrorLibraryError() { |
|
45 // for empty ErrorLibraryError creation |
|
46 } |
|
47 |
|
48 /** |
|
49 * Set name for an error |
|
50 * @param name error name |
|
51 */ |
|
52 public void SetName(String name) { |
|
53 errorName = name; |
|
54 } |
|
55 |
|
56 /** |
|
57 * Set description for an error. |
|
58 * @param description error description |
|
59 */ |
|
60 public void SetDescription(String description) { |
|
61 errorDescription = description; |
|
62 } |
|
63 |
|
64 /** |
|
65 * Adds information to an error description |
|
66 * @param description error description |
|
67 */ |
|
68 public void AddToDescription(String description) { |
|
69 errorDescription += description; |
|
70 } |
|
71 |
|
72 public String toString() { |
|
73 return errorName; |
|
74 } |
|
75 |
|
76 public String getDescription() { |
|
77 return errorDescription; |
|
78 } |
|
79 } |