Skip to content

Commit

Permalink
v1.2.26
Browse files Browse the repository at this point in the history
  • Loading branch information
hartleys committed Mar 9, 2017
1 parent 648173c commit 0415216
Show file tree
Hide file tree
Showing 16 changed files with 256 additions and 345 deletions.
Binary file modified QoRTs-vignette.pdf
Binary file not shown.
Binary file modified QoRTs.jar
Binary file not shown.
Binary file added QoRTs_1.2.26.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# QoRTs v1.2.25
(Compiled Sat Mar 4 13:22:59 EST 2017)
# QoRTs v1.2.26
(Compiled Tue Mar 7 14:22:03 EST 2017)

The [QoRTs software package](http://hartleys.github.io/QoRTs/) is a fast, efficient, and portable
multifunction toolkit designed to assist in
Expand Down
Binary file modified example-walkthrough.pdf
Binary file not shown.
31 changes: 19 additions & 12 deletions src/HartleyUtils/src/main/scala/internalUtils/Reporter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,17 @@ object Reporter {
loggers.map((logger) => logger.startReport(str,verb))
}


val warningCount = scala.collection.mutable.Map[String,Int]().withDefault((x : String) => 0);
def warning(str : String, warnType : String = "default", limit : Int = -1){
if(limit < 0 || warningCount(warnType) < limit){
reportln(str,"warn");
} else if(limit > 0 && warningCount(warnType) == limit){
reportln("(("+limit+"+ warnings of type "+warnType+". Further warnings of this type will be silent.))","warn");
}
warningCount(warnType) += 1;
}

def error(str : String){
reportln("<====== FATAL ERROR! ======>","error");
reportln("----------------------------","error");
Expand All @@ -284,9 +295,7 @@ object Reporter {
stackTrace.map((ste) => reportln(" " + ste.toString, "error"))

reportln("<==========================>","error");

closeLogs;

throw new Exception(str);
}
def error(e : Exception){
Expand All @@ -299,21 +308,19 @@ object Reporter {

reportln("<==========================>","error");
closeLogs;

throw e;
}

def closeLogs() {
if(! warningCount.keys.isEmpty){
reportln("<------->","warn");
reportln(" Note: "+warningCount.keySet.map(warningCount(_)).sum+" Warnings Thrown:","warn");
warningCount.keySet.foreach(x => {
reportln(" "+warningCount(x)+"\t"+x,"warn");
})
reportln("<------->","warn");
}
loggers.map((logger) => logger.close);
loggers = List();

inProgressFile match {
case Some(pf) => {
pf.delete();
}
case None => {
//do nothing!
}
}
}
}
Loading

0 comments on commit 0415216

Please sign in to comment.