1 | /**************************************************************** |
---|
2 | * Licensed to the Apache Software Foundation (ASF) under one * |
---|
3 | * or more contributor license agreements. See the NOTICE file * |
---|
4 | * distributed with this work for additional information * |
---|
5 | * regarding copyright ownership. The ASF licenses this file * |
---|
6 | * to you under the Apache License, Version 2.0 (the * |
---|
7 | * "License"); you may not use this file except in compliance * |
---|
8 | * with the License. You may obtain a copy of the License at * |
---|
9 | * * |
---|
10 | * http://www.apache.org/licenses/LICENSE-2.0 * |
---|
11 | * * |
---|
12 | * Unless required by applicable law or agreed to in writing, * |
---|
13 | * software distributed under the License is distributed on an * |
---|
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * |
---|
15 | * KIND, either express or implied. See the License for the * |
---|
16 | * specific language governing permissions and limitations * |
---|
17 | * under the License. * |
---|
18 | ****************************************************************/ |
---|
19 | |
---|
20 | package org.apache.james.mime4j; |
---|
21 | |
---|
22 | /** |
---|
23 | * MIME processing exception. |
---|
24 | * <p> |
---|
25 | * A <code>MimeException</code> may be thrown by a {@link org.apache.james.mime4j.parser.ContentHandler} to |
---|
26 | * indicate that it has failed to process a message event and that no further |
---|
27 | * events should be generated. |
---|
28 | * <p> |
---|
29 | * <code>MimeException</code> also gets thrown by the parser to indicate MIME |
---|
30 | * protocol errors, e.g. if a message boundary is too long or a header field |
---|
31 | * cannot be parsed. |
---|
32 | */ |
---|
33 | public class MimeException extends Exception { |
---|
34 | |
---|
35 | private static final long serialVersionUID = 8352821278714188542L; |
---|
36 | |
---|
37 | /** |
---|
38 | * Constructs a new MIME exception with the specified detail message. |
---|
39 | * |
---|
40 | * @param message detail message |
---|
41 | */ |
---|
42 | public MimeException(String message) { |
---|
43 | super(message); |
---|
44 | } |
---|
45 | |
---|
46 | /** |
---|
47 | * Constructs a MIME exception with the specified cause. |
---|
48 | * |
---|
49 | * @param cause cause of the exception |
---|
50 | */ |
---|
51 | public MimeException(Throwable cause) { |
---|
52 | super(cause); |
---|
53 | } |
---|
54 | |
---|
55 | /** |
---|
56 | * Constructs a MIME exception with the specified detail message and cause. |
---|
57 | * |
---|
58 | * @param message detail message |
---|
59 | * @param cause cause of the exception |
---|
60 | */ |
---|
61 | public MimeException(String message, Throwable cause) { |
---|
62 | super(message, cause); |
---|
63 | } |
---|
64 | |
---|
65 | } |
---|