--- /dev/null
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcustomercore.exceptions;
+
+import java.text.MessageFormat;
+import org.mxchange.jcustomercore.model.customer.Customer;
+
+/**
+ * An exception thrown when the user's account was not found
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public class CustomerNotFoundException extends Exception {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 57_382_175_461_975_680L;
+
+ /**
+ * Constructor with already registered customer instance
+ * <p>
+ * @param customer Customer instance
+ */
+ public CustomerNotFoundException (final Customer customer) {
+ // Call super contructor
+ super(MessageFormat.format("Customer {0} not found.", customer)); //NOI18N
+ }
+
+ /**
+ * Constructor with customer id
+ * <p>
+ * @param customerId Customer id
+ */
+ public CustomerNotFoundException (final Long customerId) {
+ // Construct message
+ super(MessageFormat.format("Customer id {0} not found.", customerId)); //NOI18N
+ }
+
+ /**
+ * Constructor with customer id and causing exception
+ * <p>
+ * @param customerId Customer id
+ * @param cause Causing exception
+ */
+ public CustomerNotFoundException (final Long customerId, final Throwable cause) {
+ // Construct message
+ super(MessageFormat.format("Customer id {0} not found. Cause: {1}", customerId, cause.getMessage()), cause); //NOI18N
+ }
+
+}