-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMvException.java
66 lines (57 loc) · 1.75 KB
/
MvException.java
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* AndroidWithoutStupid Java Library
* Created by V. Subhash
* http://www.VSubhash.com
* Released as Public Domain Software in 2014
*/
package com.vsubhash.droid.androidwithoutstupid;
/**
* This class wraps an {@link Exception Java Exception} so that it
* can be passed around, mostly as the return value of a function, as in
* in traditional C programming. Why do you need this? Well, most exception
* messages are cryptic and reveal no real or useful information about the
* problem. Use members of this class to add more usefulness to error details.
*
* @author V. Subhash (<a href="http://www.VSubhash.com/">www.VSubhash.com</a>)
* @version 2017.08.15
*
*/
public class MvException extends Exception {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* Whether the operation was successful. Set it to true
* if no exception was raised or if the operation yielded
* a result.
*/
public boolean mbSuccess = false;
/**
* Actual result of the operation. Set it to the object that
* you want to be returned. The calling routine should be
* aware of the class name of this object and cast it accordingly.
*/
public Object moResult = null;
/**
* Error information. Set it to the exception that caused an error.
*/
public Exception mException;
/**
* Specifies what caused the problem. Set it to a description of the
* error in human-friendly language.
*/
public String msProblem = "";
/**
* Specifies what can be done to fix the problem. Set it to a possible
* solution in human-friendly language.
*/
public String msPossibleSolution = "";
/**
* Constructs a new instance of the class.
*/
public MvException() {
super();
mException = new Exception("Exception not specified yet");
}
}