| /******************************************************************************* |
| * Copyright (c) 2006, 2015 IBM Corporation and others. |
| * |
| * This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| * James Blackburn (Broadcom Corp.) - ongoing development |
| *******************************************************************************/ |
| package org.eclipse.core.tests.internal.builders; |
| |
| import java.util.Map; |
| import org.eclipse.core.resources.IProject; |
| import org.eclipse.core.runtime.IProgressMonitor; |
| |
| /** |
| * A builder that throws exceptions from its build method |
| */ |
| public class ExceptionBuilder extends TestBuilder { |
| public static final String BUILDER_NAME = "org.eclipse.core.tests.resources.exceptionbuilder"; |
| |
| @Override |
| protected IProject[] build(int kind, Map<String, String> args, IProgressMonitor monitor) { |
| throw new RuntimeException("Thrown as part of test case by ExceptionBuilder"); |
| } |
| } |