1
0
فهرست منبع

Remove old hack: RethrowErrorHandler.

Was only used in amberc to throw compilation error
and not relevant after 0.12.3 which throws all errors anyway.
Herbert Vojčík 10 سال پیش
والد
کامیت
1d29035400
5فایلهای تغییر یافته به همراه10 افزوده شده و 76 حذف شده
  1. 5 0
      API-CHANGES.txt
  2. 5 2
      CHANGELOG
  3. 0 2
      external/amber-dev/lib/amberc.js
  4. 0 54
      src/Kernel-Infrastructure.js
  5. 0 18
      src/Kernel-Infrastructure.st

+ 5 - 0
API-CHANGES.txt

@@ -1,3 +1,8 @@
+0.18.0:
+
+* Remove class RethrowErrorHandler (hack for cli before 0.12.3).
+
+
 0.17.0:
 
 * Remove classes InterfacingObject, PlatformInterface.

+ 5 - 2
CHANGELOG

@@ -1,11 +1,14 @@
-?? October 2016 - Release 0.17.1
+?? October 2016 - Release 0.18.0
 ===================================
 
+* Remove some old internal pieces.
 * Allow new syntax for inline JS method body: <inlineJS: '...js code...'>
   * If used in libraries / reused modules, breaks fw compat.
   * Old syntax is deprecated, but retained in libraries for some grace period.
 
-Commits: https://lolg.it/amber/amber/commits/0.17.1.
+May break bw compat because of removed internal pieces.
+
+Commits: https://lolg.it/amber/amber/commits/0.18.0.
 
 
 19 October 2016 - Release 0.17.0

+ 0 - 2
external/amber-dev/lib/amberc.js

@@ -217,8 +217,6 @@ function create_compiler(configuration) {
         .then(function () {
             console.log('Compiler loaded');
 
-            configuration.globals.ErrorHandler._register_(configuration.globals.RethrowErrorHandler._new());
-
             if (0 !== configuration.jsGlobals.length) {
                 var jsGlobalVariables = configuration.core.globalJsVariables;
                 jsGlobalVariables.push.apply(jsGlobalVariables, configuration.jsGlobals);

+ 0 - 54
src/Kernel-Infrastructure.js

@@ -2218,60 +2218,6 @@ $globals.ParseError.comment="Instance of ParseError are signaled on any parsing
 //>>excludeEnd("ide");
 
 
-$core.addClass('RethrowErrorHandler', $globals.Object, [], 'Kernel-Infrastructure');
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.RethrowErrorHandler.comment="This class is used in the commandline version of the compiler.\x0aIt uses the handleError: message of ErrorHandler for printing the stacktrace and throws the error again as JS exception.\x0aAs a result Smalltalk errors are not swallowd by the Amber runtime and compilation can be aborted.";
-//>>excludeEnd("ide");
-$core.addMethod(
-$core.method({
-selector: "basicSignal:",
-protocol: 'error handling',
-fn: function (anError){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-throw anError;
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"basicSignal:",{anError:anError},$globals.RethrowErrorHandler)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anError"],
-source: "basicSignal: anError\x0a        <throw anError>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.RethrowErrorHandler);
-
-$core.addMethod(
-$core.method({
-selector: "handleError:",
-protocol: 'error handling',
-fn: function (anError){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-self._basicSignal_(anError);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},$globals.RethrowErrorHandler)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anError"],
-source: "handleError: anError\x0a        self basicSignal: anError",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["basicSignal:"]
-}),
-$globals.RethrowErrorHandler);
-
-
-
 $core.addClass('Setting', $globals.Object, ['key', 'value', 'defaultValue'], 'Kernel-Infrastructure');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Setting.comment="I represent a setting **stored** at `Smalltalk settings`. \x0aIn the current implementation, `Smalltalk settings` is an object persisted in the localStorage.\x0a\x0a## API\x0a\x0aA `Setting` value can be read using `value` and set using `value:`.\x0a\x0aSettings are accessed with `'key' asSetting` or `'key' asSettingIfAbsent: aDefaultValue`.\x0a\x0aTo read the value of a setting you can also use the convenience:\x0a\x0a`theValueSet :=  'any.characteristic' settingValue` \x0a\x0aor with a default using:\x0a\x0a `theEnsuredValueSet := 'any.characteristic' settingValueIfAbsent: true`";

+ 0 - 18
src/Kernel-Infrastructure.st

@@ -603,24 +603,6 @@ Error subclass: #ParseError
 Instance of ParseError are signaled on any parsing error.
 See `Smalltalk >> #parse:`!
 
-Object subclass: #RethrowErrorHandler
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!RethrowErrorHandler commentStamp!
-This class is used in the commandline version of the compiler.
-It uses the handleError: message of ErrorHandler for printing the stacktrace and throws the error again as JS exception.
-As a result Smalltalk errors are not swallowd by the Amber runtime and compilation can be aborted.!
-
-!RethrowErrorHandler methodsFor: 'error handling'!
-
-basicSignal: anError
-        <throw anError>
-!
-
-handleError: anError
-        self basicSignal: anError
-! !
-
 Object subclass: #Setting
 	instanceVariableNames: 'key value defaultValue'
 	package: 'Kernel-Infrastructure'!