aboutsummaryrefslogtreecommitdiff
path: root/Tools/MathematicaMisc/Errors.m
diff options
context:
space:
mode:
authorBarry Wardell <barry.wardell@gmail.com>2012-02-09 16:44:49 +0000
committerBarry Wardell <barry.wardell@gmail.com>2012-02-09 16:44:49 +0000
commita497c627ec200f89807b2295b5553b9595f3bc26 (patch)
treeed2d5f2392b5410f6a6c8d76173e600ca0c3c2ba /Tools/MathematicaMisc/Errors.m
parent15b9115dcc6c6301fad18a9444aa81b4768ca0ba (diff)
Revert "Errors.m: Add function execution tracing option"
This reverts commit c2d8c677cb8be7c549391d8dca41a3e2ef830921. It was causing Kranc to run much more slowly.
Diffstat (limited to 'Tools/MathematicaMisc/Errors.m')
-rw-r--r--Tools/MathematicaMisc/Errors.m17
1 files changed, 2 insertions, 15 deletions
diff --git a/Tools/MathematicaMisc/Errors.m b/Tools/MathematicaMisc/Errors.m
index 53cfcd7..f75bb3b 100644
--- a/Tools/MathematicaMisc/Errors.m
+++ b/Tools/MathematicaMisc/Errors.m
@@ -11,7 +11,6 @@ InfoMessage;
SetDebugLevel;
ErrorDefinition::usage = "ErrorDefinition[f] creates a default definition of a function f which throws an exception. This can be used to catch programming errors where f is called with incorrect arguments.";
PrintError;
-TraceExecution;
DebugQuiet = 0;
Warnings = 1
@@ -98,23 +97,11 @@ ErrorDefinition[x_] :=
SetAttributes[DefFn, HoldAll];
-TraceExecution = False;
-TraceExecutionIndent = "";
-
DefFn[def:(fn_[args___] := body_)] :=
Module[
- {result = Unique["result"]},
+ {},
ErrorDefinition[fn];
- Quiet[
- fn[args] :=
- Module[
- {result},
- If[TraceExecution, Print[TraceExecutionIndent, fn," ", Map[InputForm[First[#]] &,{args}]]];
- TraceExecutionIndent="| "<>TraceExecutionIndent;
- result2 = body;
- TraceExecutionIndent=StringDrop[TraceExecutionIndent,2];
- If[TraceExecution, Print[TraceExecutionIndent, "-> ", InputForm@result2]];
- result2], RuleDelayed::rhs]];
+ fn[args] := (*Profile[fn,*)body(*]*)];
End[];