|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.game.BugReporter
public class BugReporter
WRITEME: Document this type.
Field Summary | |
---|---|
private String |
bugPrelude
WRITEME: Document this brpocock@star-hope.org |
private static Set<Long> |
bugsMailed
when were bugs eMailed? Don't blow up my mailbox |
private String |
confPrefix
WRITEME: Document this brpocock@star-hope.org |
private javax.mail.Address |
mailFrom
WRITEME: Document this brpocock@star-hope.org |
private javax.mail.Address |
mailTo
WRITEME: Document this brpocock@star-hope.org |
private String |
purpose
WRITEME: Document this brpocock@star-hope.org |
private static Map<String,BugReporter> |
reporters
WRITEME: Document this brpocock@star-hope.org |
private String |
subjectTagline
WRITEME: Document this brpocock@star-hope.org |
Constructor Summary | |
---|---|
private |
BugReporter(String newPurpose)
WRITEME: Document this constructor brpocock@star-hope.org |
Method Summary | |
---|---|
void |
bugDuplex(String subject,
String message)
WRITEME: Document this method brpocock@star-hope.org |
Error |
fatalBug(Exception e)
WRITEME: Document this method brpocock@star-hope.org |
Error |
fatalBug(String string,
Throwable t)
WRITEME: Document this method brpocock@star-hope.org |
String |
getBugPrelude()
|
javax.mail.Address |
getMailFrom()
WRITEME: Document this method brpocock@star-hope.org |
javax.mail.Address |
getMailTo()
|
private String |
getPurpose()
|
static BugReporter |
getReporter(String purpose)
Get a bug reporter instance for a certain type of bugs. |
(package private) static String |
getStackTrace(Throwable throwable)
This extracts a stack backtrace from a Throwable into a string format for a bug report. |
(package private) static String |
getStackTrace(Throwable throwable,
String prefix)
This extracts a stack backtrace from a Throwable into a string format for a bug report. |
String |
getSubjectTagline()
|
void |
reportBug(Exception e)
WRITEME: Document this method brpocock@star-hope.org |
void |
reportBug(String message)
WRITEME: Document this method brpocock@star-hope.org |
void |
reportBug(String string,
boolean b)
WRITEME: Document this method brpocock@star-hope.org |
void |
reportBug(String reason,
Thread thread)
WRITEME: Document this method brpocock@star-hope.org |
void |
reportBug(String reason,
Throwable throwable)
Report a bug to the automatic bug-tracking systems. |
private void |
sendBugReport(String subject,
String message)
Send a bug report via eMail. |
void |
setBugPrelude(String newPrelude)
|
void |
setMailFrom(String newMailFrom)
WRITEME: Document this method brpocock@star-hope.org |
void |
setMailTo(String newMail)
|
void |
setSubjectTagline(String newTagline)
|
private boolean |
tooManyBugsMailed()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Map<String,BugReporter> reporters
private javax.mail.Address mailTo
private String subjectTagline
private String bugPrelude
private final String confPrefix
private static Set<Long> bugsMailed
private javax.mail.Address mailFrom
private final String purpose
Constructor Detail |
---|
private BugReporter(String newPurpose) throws NotFoundException, javax.mail.internet.AddressException
newPurpose
- WRITEME
NotFoundException
- WRITEME
javax.mail.internet.AddressException
- if the addresses given for “from” or
“to” fail to parseMethod Detail |
---|
public static BugReporter getReporter(String purpose)
purpose
- what kind of bugs are we reporting? see above.
static String getStackTrace(Throwable throwable)
This extracts a stack backtrace from a Throwable into a string format for a bug report. Each line is tagged with a leading "/#" string, followed by a space, the stack backtrace element, and a newline.
This is the same as calling
getStackTrace(Throwable, String)
with a
prefix of "\n/#"
throwable
- The Throwable containing stack backtrace data
static String getStackTrace(Throwable throwable, String prefix)
throwable
- A Throwable
from which to extract a
stack traceprefix
- The string with which to separate lines of the
trace.
public void bugDuplex(String subject, String message)
subject
- WRITEMEmessage
- WRITEMEpublic Error fatalBug(Exception e)
e
- WRITEME
public Error fatalBug(String string, Throwable t)
string
- WRITEMEt
- WRITEME
public String getBugPrelude()
public javax.mail.Address getMailFrom()
public javax.mail.Address getMailTo()
private String getPurpose()
public String getSubjectTagline()
public void reportBug(Exception e)
e
- WRITEMEpublic void reportBug(String message)
message
- WRITEMEpublic void reportBug(String string, boolean b)
WRITEME: Document this method brpocock@star-hope.org
TODO, implement
string
- WRITEMEb
- WRITEMEpublic void reportBug(String reason, Thread thread)
reason
- the message contentthread
- the thread throwing the exceptionpublic void reportBug(String reason, Throwable throwable)
reason
- The reason this is a bug, if known.throwable
- The "impossible" exception.private void sendBugReport(String subject, String message)
subject
- The subject of the mail messagemessage
- The stack trace and associated details involved.public void setBugPrelude(String newPrelude)
newPrelude
- the bugPrelude to setpublic void setMailFrom(String newMailFrom) throws javax.mail.internet.AddressException
newMailFrom
- WRITEME
javax.mail.internet.AddressException
- WRITEMEpublic void setMailTo(String newMail) throws javax.mail.internet.AddressException
newMail
- the mailTo to set
javax.mail.internet.AddressException
- WRITEMEpublic void setSubjectTagline(String newTagline)
newTagline
- the subjectTagline to setprivate boolean tooManyBugsMailed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |