From e61829ca96fa20fb0ba1304bc41b9a17179bf497 Mon Sep 17 00:00:00 2001 From: James Harkins Date: Wed, 7 Dec 2011 22:19:33 +0800 Subject: [PATCH] Gremlin cleanup: remove trailing ^M in several lines --- SCClassLibrary/Common/Core/Error.sc | 42 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/SCClassLibrary/Common/Core/Error.sc b/SCClassLibrary/Common/Core/Error.sc index b1407b4ed..c649a5a7a 100644 --- a/SCClassLibrary/Common/Core/Error.sc +++ b/SCClassLibrary/Common/Core/Error.sc @@ -6,11 +6,11 @@ Exception { var <>what, <>protectedBacktrace, <>path; *new { arg what; - var protectedBacktrace, instance; - if (debug || inProtectedFunction, { - protectedBacktrace = this.getBackTrace.caller; + var protectedBacktrace, instance; + if (debug || inProtectedFunction, { + protectedBacktrace = this.getBackTrace.caller; inProtectedFunction = false; - }); + }); ^super.newCopyArgs(what ? this.name, thisProcess.nowExecutingPath); } errorString { @@ -26,37 +26,37 @@ Exception { ^("For advice: [http://supercollider.sf.net/wiki/index.php/%]" .format(this.errorString.tr($ , $_).tr($\n, $_))); } - postProtectedBacktrace { + postProtectedBacktrace { var out, currentFrame, def, ownerClass, methodName, pos = 0; - out = CollStream.new; - "\nPROTECTED CALL STACK:".postln; - currentFrame = protectedBacktrace; - while({currentFrame.notNil}, { + out = CollStream.new; + "\nPROTECTED CALL STACK:".postln; + currentFrame = protectedBacktrace; + while({currentFrame.notNil}, { def = currentFrame.functionDef; if(def.isKindOf(Method), { ownerClass = def.ownerClass; methodName = def.name; if(ownerClass == Function && (methodName == 'protect'), { pos = out.pos; - }); + }); out << "\t%:%\t%\n".format(ownerClass, methodName, currentFrame.address); }, { out << "\ta FunctionDef\t%\n".format(currentFrame.address); out << "\t\tsourceCode = %\n".format(def.sourceCode ? ""); - }); - def.argNames.do({|name, i| - out << "\t\targ % = %\n".format(name, currentFrame.args[i]); - }); - def.varNames.do({|name, i| - out << "\t\targ % = %\n".format(name, currentFrame.args[i]); - }); - currentFrame = currentFrame.caller; + }); + def.argNames.do({|name, i| + out << "\t\targ % = %\n".format(name, currentFrame.args[i]); + }); + def.varNames.do({|name, i| + out << "\t\targ % = %\n".format(name, currentFrame.args[i]); + }); + currentFrame = currentFrame.caller; }); // lose everything after the last Function:protect // it just duplicates the normal stack with less info - out.collection.copyFromStart(pos).postln; - } - + out.collection.copyFromStart(pos).postln; + } + isException { ^true } } -- 2.11.4.GIT