Skip to main content
summaryrefslogtreecommitdiffstats
blob: bd54922cdd8deaa05b1207484792a6b9b816db94 (plain) (blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*******************************************************************************
 * Copyright (c) 2004, 2007 Boeing.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Boeing - initial API and implementation
 *******************************************************************************/
package org.eclipse.osee.ote.core;

import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import org.eclipse.osee.framework.logging.IHealthStatus;

public class TestException extends RuntimeException {

   private static final long serialVersionUID = -5628986844200418864L;

   private final String threadCauseName;
   private final Level level;
   private List<IHealthStatus> status = new ArrayList<>();

   public TestException(String message, Level level) {
      this(message, level, null);
   }

   public TestException(String message, Level level, Throwable cause) {
      super(message, cause);
      this.level = level;
      threadCauseName = Thread.currentThread().getName();
   }

   public TestException(String message, List<IHealthStatus> status) {
      this(message, Level.SEVERE);
      this.status = status;
   }

   public String getThreadName() {
      return threadCauseName;
   }

   public Level getLevel() {
      return level;
   }

   public List<IHealthStatus> getHealthStatus() {
      return status;
   }
}

Back to the top