1 /*******************************************************************************
2  * Copyright (c) 2009, 2015 Mountainminds GmbH & Co. KG and Contributors
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *    Marc R. Hoffmann - initial API and implementation
10  *
11  *******************************************************************************/
12 package org.jacoco.agent.rt.internal;
13 
14 /**
15  * At several places exception might occur that should be reported. For
16  * testability these exceptions are emitted against this interface.
17  */
18 public interface IExceptionLogger {
19 
20 	/**
21 	 * Default implementation which dumps the stack trace to System.err.
22 	 */
23 	IExceptionLogger SYSTEM_ERR = new IExceptionLogger() {
24 		public void logExeption(final Exception ex) {
25 			ex.printStackTrace();
26 		}
27 	};
28 
29 	/**
30 	 * Logs the given exception.
31 	 *
32 	 * @param ex
33 	 *            exception to log
34 	 */
logExeption(Exception ex)35 	public void logExeption(Exception ex);
36 
37 }
38