-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBencodingException.java
More file actions
executable file
·48 lines (43 loc) · 1.02 KB
/
Copy pathBencodingException.java
File metadata and controls
executable file
·48 lines (43 loc) · 1.02 KB
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
/**
*
*/
package edu.rutgers.cs.cs352.bt.exceptions;
/**
* @author Robert Moore II
*
*/
public final class BencodingException extends Exception
{
/**
* Automatically generated and unused.
*/
private static final long serialVersionUID = -4829433031030292728L;
/**
* The message to display regarding the exception.
*/
private final String message;
/**
* Creates a new BencodingException with a blank message.
*/
public BencodingException()
{
this.message = null;
}
/**
* Creates a new BencodingException with the message provided.
* @param message the message to display to the user.
*/
public BencodingException(final String message)
{
this.message = message;
}
/**
* Returns a string containing the exception message specified during
* creation.
*/
@Override
public final String toString()
{
return "Bencoding Exception:\n"+(message == null ? "" : message);
}
}