Kernel-Exceptions.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  1. define("amber_core/Kernel-Exceptions", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
  2. var smalltalk=$boot.vm,nil=$boot.nil,_st=$boot.asReceiver,globals=$boot.globals;
  3. smalltalk.addPackage('Kernel-Exceptions');
  4. smalltalk.packages["Kernel-Exceptions"].transport = {"type":"amd","amdNamespace":"amber_core"};
  5. smalltalk.addClass('Error', globals.Object, ['messageText'], 'Kernel-Exceptions');
  6. globals.Error.comment="From the ANSI standard:\x0a\x0aThis protocol describes the behavior of instances of class `Error`.\x0aThese are used to represent error conditions that prevent the normal continuation of processing.\x0aActual error exceptions used by an application may be subclasses of this class.\x0aAs `Error` is explicitly specified to be subclassable, conforming implementations must implement its behavior in a non-fragile manner.";
  7. smalltalk.addMethod(
  8. smalltalk.method({
  9. selector: "beHandled",
  10. protocol: 'accessing',
  11. fn: function (){
  12. var self=this;
  13. return smalltalk.withContext(function($ctx1) {
  14. self.amberHandled = true;
  15. return self}, function($ctx1) {$ctx1.fill(self,"beHandled",{},globals.Error)});
  16. },
  17. args: [],
  18. source: "beHandled\x0a\x09<self.amberHandled = true>",
  19. messageSends: [],
  20. referencedClasses: []
  21. }),
  22. globals.Error);
  23. smalltalk.addMethod(
  24. smalltalk.method({
  25. selector: "beUnhandled",
  26. protocol: 'accessing',
  27. fn: function (){
  28. var self=this;
  29. return smalltalk.withContext(function($ctx1) {
  30. self.amberHandled = false;
  31. return self}, function($ctx1) {$ctx1.fill(self,"beUnhandled",{},globals.Error)});
  32. },
  33. args: [],
  34. source: "beUnhandled\x0a\x09<self.amberHandled = false>",
  35. messageSends: [],
  36. referencedClasses: []
  37. }),
  38. globals.Error);
  39. smalltalk.addMethod(
  40. smalltalk.method({
  41. selector: "context",
  42. protocol: 'accessing',
  43. fn: function (){
  44. var self=this;
  45. return smalltalk.withContext(function($ctx1) {
  46. return self.context;
  47. return self}, function($ctx1) {$ctx1.fill(self,"context",{},globals.Error)});
  48. },
  49. args: [],
  50. source: "context\x0a\x09<return self.context>",
  51. messageSends: [],
  52. referencedClasses: []
  53. }),
  54. globals.Error);
  55. smalltalk.addMethod(
  56. smalltalk.method({
  57. selector: "initialize",
  58. protocol: 'initialization',
  59. fn: function (){
  60. var self=this;
  61. return smalltalk.withContext(function($ctx1) {
  62. self._messageText_("Errorclass: ".__comma(_st(self._class())._name()));
  63. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.Error)});
  64. },
  65. args: [],
  66. source: "initialize\x0a\x09self messageText: 'Errorclass: ', (self class name).",
  67. messageSends: ["messageText:", ",", "name", "class"],
  68. referencedClasses: []
  69. }),
  70. globals.Error);
  71. smalltalk.addMethod(
  72. smalltalk.method({
  73. selector: "isSmalltalkError",
  74. protocol: 'testing',
  75. fn: function (){
  76. var self=this;
  77. return smalltalk.withContext(function($ctx1) {
  78. return self.smalltalkError === true;
  79. return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkError",{},globals.Error)});
  80. },
  81. args: [],
  82. source: "isSmalltalkError\x0a\x09<return self.smalltalkError === true>",
  83. messageSends: [],
  84. referencedClasses: []
  85. }),
  86. globals.Error);
  87. smalltalk.addMethod(
  88. smalltalk.method({
  89. selector: "jsStack",
  90. protocol: 'accessing',
  91. fn: function (){
  92. var self=this;
  93. return smalltalk.withContext(function($ctx1) {
  94. return self.stack;
  95. return self}, function($ctx1) {$ctx1.fill(self,"jsStack",{},globals.Error)});
  96. },
  97. args: [],
  98. source: "jsStack\x0a\x09<return self.stack>",
  99. messageSends: [],
  100. referencedClasses: []
  101. }),
  102. globals.Error);
  103. smalltalk.addMethod(
  104. smalltalk.method({
  105. selector: "messageText",
  106. protocol: 'accessing',
  107. fn: function (){
  108. var self=this;
  109. var $1;
  110. $1=self["@messageText"];
  111. return $1;
  112. },
  113. args: [],
  114. source: "messageText\x0a\x09^ messageText",
  115. messageSends: [],
  116. referencedClasses: []
  117. }),
  118. globals.Error);
  119. smalltalk.addMethod(
  120. smalltalk.method({
  121. selector: "messageText:",
  122. protocol: 'accessing',
  123. fn: function (aString){
  124. var self=this;
  125. self["@messageText"]=aString;
  126. return self
  127. },
  128. args: ["aString"],
  129. source: "messageText: aString\x0a\x09messageText := aString",
  130. messageSends: [],
  131. referencedClasses: []
  132. }),
  133. globals.Error);
  134. smalltalk.addMethod(
  135. smalltalk.method({
  136. selector: "resignal",
  137. protocol: 'signaling',
  138. fn: function (){
  139. var self=this;
  140. return smalltalk.withContext(function($ctx1) {
  141. self.amberHandled = false;
  142. throw(self);
  143. ;
  144. return self}, function($ctx1) {$ctx1.fill(self,"resignal",{},globals.Error)});
  145. },
  146. args: [],
  147. source: "resignal\x0a\x09\x22Resignal the receiver without changing its exception context\x22\x0a\x09\x0a\x09<\x0a\x09\x09self.amberHandled = false;\x0a\x09\x09throw(self);\x0a\x09>",
  148. messageSends: [],
  149. referencedClasses: []
  150. }),
  151. globals.Error);
  152. smalltalk.addMethod(
  153. smalltalk.method({
  154. selector: "signal",
  155. protocol: 'signaling',
  156. fn: function (){
  157. var self=this;
  158. return smalltalk.withContext(function($ctx1) {
  159. self.amberHandled = false;
  160. self.context = smalltalk.getThisContext();
  161. self.smalltalkError = true; throw(self)
  162. ;
  163. return self}, function($ctx1) {$ctx1.fill(self,"signal",{},globals.Error)});
  164. },
  165. args: [],
  166. source: "signal\x0a\x09<\x0a\x09\x09self.amberHandled = false;\x0a\x09\x09self.context = smalltalk.getThisContext(); \x0a\x09\x09self.smalltalkError = true; throw(self)\x0a\x09>",
  167. messageSends: [],
  168. referencedClasses: []
  169. }),
  170. globals.Error);
  171. smalltalk.addMethod(
  172. smalltalk.method({
  173. selector: "signal:",
  174. protocol: 'signaling',
  175. fn: function (aString){
  176. var self=this;
  177. return smalltalk.withContext(function($ctx1) {
  178. self._messageText_(aString);
  179. self._signal();
  180. return self}, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},globals.Error)});
  181. },
  182. args: ["aString"],
  183. source: "signal: aString\x0a\x09self messageText: aString.\x0a\x09self signal",
  184. messageSends: ["messageText:", "signal"],
  185. referencedClasses: []
  186. }),
  187. globals.Error);
  188. smalltalk.addMethod(
  189. smalltalk.method({
  190. selector: "signalerContext",
  191. protocol: 'accessing',
  192. fn: function (){
  193. var self=this;
  194. return smalltalk.withContext(function($ctx1) {
  195. var $1;
  196. $1=self._signalerContextFrom_(self._context());
  197. return $1;
  198. }, function($ctx1) {$ctx1.fill(self,"signalerContext",{},globals.Error)});
  199. },
  200. args: [],
  201. source: "signalerContext\x0a\x09^ self signalerContextFrom: self context",
  202. messageSends: ["signalerContextFrom:", "context"],
  203. referencedClasses: []
  204. }),
  205. globals.Error);
  206. smalltalk.addMethod(
  207. smalltalk.method({
  208. selector: "signalerContextFrom:",
  209. protocol: 'accessing',
  210. fn: function (aContext){
  211. var self=this;
  212. return smalltalk.withContext(function($ctx1) {
  213. var $4,$3,$2,$1;
  214. $1=_st(aContext)._findContextSuchThat_((function(context){
  215. return smalltalk.withContext(function($ctx2) {
  216. $4=_st(context)._receiver();
  217. $ctx2.sendIdx["receiver"]=1;
  218. $3=_st($4).__eq_eq(self);
  219. $ctx2.sendIdx["=="]=1;
  220. $2=_st($3)._or_((function(){
  221. return smalltalk.withContext(function($ctx3) {
  222. return _st(_st(context)._receiver()).__eq_eq(self._class());
  223. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  224. }));
  225. return _st($2)._not();
  226. }, function($ctx2) {$ctx2.fillBlock({context:context},$ctx1,1)});
  227. }));
  228. return $1;
  229. }, function($ctx1) {$ctx1.fill(self,"signalerContextFrom:",{aContext:aContext},globals.Error)});
  230. },
  231. args: ["aContext"],
  232. source: "signalerContextFrom: aContext\x0a\x09\x22Find the first sender of signal(:), the first context which is neither \x0a\x09for an instance method nor for a class side method of Exception (or subclass).\x0a\x09This will make sure that the same context is found for both, `Error signal` \x0a\x09and `Error new signal`\x22\x0a\x0a\x09^ aContext findContextSuchThat: [ :context |\x0a\x09\x09(context receiver == self \x0a\x09\x09or: [ context receiver == self class ]) not ]",
  233. messageSends: ["findContextSuchThat:", "not", "or:", "==", "receiver", "class"],
  234. referencedClasses: []
  235. }),
  236. globals.Error);
  237. smalltalk.addMethod(
  238. smalltalk.method({
  239. selector: "wasHandled",
  240. protocol: 'testing',
  241. fn: function (){
  242. var self=this;
  243. return smalltalk.withContext(function($ctx1) {
  244. return self.amberHandled || false;
  245. return self}, function($ctx1) {$ctx1.fill(self,"wasHandled",{},globals.Error)});
  246. },
  247. args: [],
  248. source: "wasHandled\x0a\x09<return self.amberHandled || false>",
  249. messageSends: [],
  250. referencedClasses: []
  251. }),
  252. globals.Error);
  253. smalltalk.addMethod(
  254. smalltalk.method({
  255. selector: "heliosClass",
  256. protocol: 'helios',
  257. fn: function (){
  258. var self=this;
  259. return "exception";
  260. },
  261. args: [],
  262. source: "heliosClass\x0a\x09^ 'exception'",
  263. messageSends: [],
  264. referencedClasses: []
  265. }),
  266. globals.Error.klass);
  267. smalltalk.addMethod(
  268. smalltalk.method({
  269. selector: "signal",
  270. protocol: 'instance creation',
  271. fn: function (){
  272. var self=this;
  273. return smalltalk.withContext(function($ctx1) {
  274. var $1;
  275. $1=_st(self._new())._signal();
  276. return $1;
  277. }, function($ctx1) {$ctx1.fill(self,"signal",{},globals.Error.klass)});
  278. },
  279. args: [],
  280. source: "signal\x0a\x09^ self new signal",
  281. messageSends: ["signal", "new"],
  282. referencedClasses: []
  283. }),
  284. globals.Error.klass);
  285. smalltalk.addMethod(
  286. smalltalk.method({
  287. selector: "signal:",
  288. protocol: 'instance creation',
  289. fn: function (aString){
  290. var self=this;
  291. return smalltalk.withContext(function($ctx1) {
  292. var $1;
  293. $1=_st(self._new())._signal_(aString);
  294. return $1;
  295. }, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},globals.Error.klass)});
  296. },
  297. args: ["aString"],
  298. source: "signal: aString\x0a\x09^ self new\x0a\x09\x09signal: aString",
  299. messageSends: ["signal:", "new"],
  300. referencedClasses: []
  301. }),
  302. globals.Error.klass);
  303. smalltalk.addClass('Halt', globals.Error, [], 'Kernel-Exceptions');
  304. globals.Halt.comment="I am provided to support `Object>>#halt`.";
  305. smalltalk.addMethod(
  306. smalltalk.method({
  307. selector: "messageText",
  308. protocol: 'accessing',
  309. fn: function (){
  310. var self=this;
  311. return "Halt encountered";
  312. },
  313. args: [],
  314. source: "messageText\x0a\x09^ 'Halt encountered'",
  315. messageSends: [],
  316. referencedClasses: []
  317. }),
  318. globals.Halt);
  319. smalltalk.addMethod(
  320. smalltalk.method({
  321. selector: "signalerContextFrom:",
  322. protocol: 'accessing',
  323. fn: function (aContext){
  324. var self=this;
  325. return smalltalk.withContext(function($ctx1) {
  326. var $4,$3,$2,$1;
  327. $1=_st(aContext)._findContextSuchThat_((function(context){
  328. return smalltalk.withContext(function($ctx2) {
  329. $4=_st(context)._receiver();
  330. $ctx2.sendIdx["receiver"]=1;
  331. $3=_st($4).__eq_eq(self);
  332. $ctx2.sendIdx["=="]=1;
  333. $2=_st($3)._or_((function(){
  334. return smalltalk.withContext(function($ctx3) {
  335. return _st(_st(_st(context)._receiver()).__eq_eq(self._class()))._or_((function(){
  336. return smalltalk.withContext(function($ctx4) {
  337. return _st(_st(_st(context)._method())._selector()).__eq("halt");
  338. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  339. }));
  340. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  341. }));
  342. $ctx2.sendIdx["or:"]=1;
  343. return _st($2)._not();
  344. }, function($ctx2) {$ctx2.fillBlock({context:context},$ctx1,1)});
  345. }));
  346. return $1;
  347. }, function($ctx1) {$ctx1.fill(self,"signalerContextFrom:",{aContext:aContext},globals.Halt)});
  348. },
  349. args: ["aContext"],
  350. source: "signalerContextFrom: aContext\x0a\x09\x22specialized version to find the proper context to open the debugger on.\x0a\x09This will find the first context whose method is no longer on `Halt` or \x0a\x09`Halt class` nor is `#halt` method itself.\x22\x0a\x09\x0a\x09^ aContext findContextSuchThat: [ :context |\x0a\x09\x09(context receiver == self \x0a\x09\x09or: [ (context receiver == self class) \x0a\x09\x09or: [ context method selector = #halt ]]) not ]",
  351. messageSends: ["findContextSuchThat:", "not", "or:", "==", "receiver", "class", "=", "selector", "method"],
  352. referencedClasses: []
  353. }),
  354. globals.Halt);
  355. smalltalk.addClass('JavaScriptException', globals.Error, ['exception'], 'Kernel-Exceptions');
  356. globals.JavaScriptException.comment="A JavaScriptException is thrown when a non-Smalltalk exception occurs while in the Smalltalk stack.\x0aSee `boot.js` `inContext()` and `BlockClosure >> on:do:`";
  357. smalltalk.addMethod(
  358. smalltalk.method({
  359. selector: "context:",
  360. protocol: 'accessing',
  361. fn: function (aMethodContext){
  362. var self=this;
  363. return smalltalk.withContext(function($ctx1) {
  364. self.context = aMethodContext;
  365. return self}, function($ctx1) {$ctx1.fill(self,"context:",{aMethodContext:aMethodContext},globals.JavaScriptException)});
  366. },
  367. args: ["aMethodContext"],
  368. source: "context: aMethodContext\x0a\x09\x22Set the context from the outside.\x0a\x09See boot.js `inContext()` exception handling\x22\x0a\x09\x0a\x09<self.context = aMethodContext>",
  369. messageSends: [],
  370. referencedClasses: []
  371. }),
  372. globals.JavaScriptException);
  373. smalltalk.addMethod(
  374. smalltalk.method({
  375. selector: "exception",
  376. protocol: 'accessing',
  377. fn: function (){
  378. var self=this;
  379. var $1;
  380. $1=self["@exception"];
  381. return $1;
  382. },
  383. args: [],
  384. source: "exception\x0a\x09^ exception",
  385. messageSends: [],
  386. referencedClasses: []
  387. }),
  388. globals.JavaScriptException);
  389. smalltalk.addMethod(
  390. smalltalk.method({
  391. selector: "exception:",
  392. protocol: 'accessing',
  393. fn: function (anException){
  394. var self=this;
  395. self["@exception"]=anException;
  396. return self
  397. },
  398. args: ["anException"],
  399. source: "exception: anException\x0a\x09exception := anException",
  400. messageSends: [],
  401. referencedClasses: []
  402. }),
  403. globals.JavaScriptException);
  404. smalltalk.addMethod(
  405. smalltalk.method({
  406. selector: "messageText",
  407. protocol: 'accessing',
  408. fn: function (){
  409. var self=this;
  410. return smalltalk.withContext(function($ctx1) {
  411. return 'JavaScript exception: ' + self["@exception"].toString();
  412. return self}, function($ctx1) {$ctx1.fill(self,"messageText",{},globals.JavaScriptException)});
  413. },
  414. args: [],
  415. source: "messageText\x0a\x09<return 'JavaScript exception: ' + self[\x22@exception\x22].toString()>",
  416. messageSends: [],
  417. referencedClasses: []
  418. }),
  419. globals.JavaScriptException);
  420. smalltalk.addMethod(
  421. smalltalk.method({
  422. selector: "on:",
  423. protocol: 'instance creation',
  424. fn: function (anException){
  425. var self=this;
  426. return smalltalk.withContext(function($ctx1) {
  427. var $2,$3,$1;
  428. $2=self._new();
  429. _st($2)._exception_(anException);
  430. $3=_st($2)._yourself();
  431. $1=$3;
  432. return $1;
  433. }, function($ctx1) {$ctx1.fill(self,"on:",{anException:anException},globals.JavaScriptException.klass)});
  434. },
  435. args: ["anException"],
  436. source: "on: anException\x0a\x09^ self new\x0a\x09\x09exception: anException;\x0a\x09\x09yourself",
  437. messageSends: ["exception:", "new", "yourself"],
  438. referencedClasses: []
  439. }),
  440. globals.JavaScriptException.klass);
  441. smalltalk.addMethod(
  442. smalltalk.method({
  443. selector: "on:context:",
  444. protocol: 'instance creation',
  445. fn: function (anException,aMethodContext){
  446. var self=this;
  447. return smalltalk.withContext(function($ctx1) {
  448. var $2,$3,$1;
  449. $2=self._new();
  450. _st($2)._exception_(anException);
  451. _st($2)._context_(aMethodContext);
  452. $3=_st($2)._yourself();
  453. $1=$3;
  454. return $1;
  455. }, function($ctx1) {$ctx1.fill(self,"on:context:",{anException:anException,aMethodContext:aMethodContext},globals.JavaScriptException.klass)});
  456. },
  457. args: ["anException", "aMethodContext"],
  458. source: "on: anException context: aMethodContext\x0a\x09^ self new\x0a\x09\x09exception: anException;\x0a\x09\x09context: aMethodContext;\x0a\x09\x09yourself",
  459. messageSends: ["exception:", "new", "context:", "yourself"],
  460. referencedClasses: []
  461. }),
  462. globals.JavaScriptException.klass);
  463. smalltalk.addClass('MessageNotUnderstood', globals.Error, ['message', 'receiver'], 'Kernel-Exceptions');
  464. globals.MessageNotUnderstood.comment="This exception is provided to support `Object>>doesNotUnderstand:`.";
  465. smalltalk.addMethod(
  466. smalltalk.method({
  467. selector: "message",
  468. protocol: 'accessing',
  469. fn: function (){
  470. var self=this;
  471. var $1;
  472. $1=self["@message"];
  473. return $1;
  474. },
  475. args: [],
  476. source: "message\x0a\x09^ message",
  477. messageSends: [],
  478. referencedClasses: []
  479. }),
  480. globals.MessageNotUnderstood);
  481. smalltalk.addMethod(
  482. smalltalk.method({
  483. selector: "message:",
  484. protocol: 'accessing',
  485. fn: function (aMessage){
  486. var self=this;
  487. self["@message"]=aMessage;
  488. return self
  489. },
  490. args: ["aMessage"],
  491. source: "message: aMessage\x0a\x09message := aMessage",
  492. messageSends: [],
  493. referencedClasses: []
  494. }),
  495. globals.MessageNotUnderstood);
  496. smalltalk.addMethod(
  497. smalltalk.method({
  498. selector: "messageText",
  499. protocol: 'accessing',
  500. fn: function (){
  501. var self=this;
  502. return smalltalk.withContext(function($ctx1) {
  503. var $1;
  504. $1=_st(_st(_st(self._receiver())._asString()).__comma(" does not understand #")).__comma(_st(self._message())._selector());
  505. $ctx1.sendIdx[","]=1;
  506. return $1;
  507. }, function($ctx1) {$ctx1.fill(self,"messageText",{},globals.MessageNotUnderstood)});
  508. },
  509. args: [],
  510. source: "messageText\x0a\x09^ self receiver asString, ' does not understand #', self message selector",
  511. messageSends: [",", "asString", "receiver", "selector", "message"],
  512. referencedClasses: []
  513. }),
  514. globals.MessageNotUnderstood);
  515. smalltalk.addMethod(
  516. smalltalk.method({
  517. selector: "receiver",
  518. protocol: 'accessing',
  519. fn: function (){
  520. var self=this;
  521. var $1;
  522. $1=self["@receiver"];
  523. return $1;
  524. },
  525. args: [],
  526. source: "receiver\x0a\x09^ receiver",
  527. messageSends: [],
  528. referencedClasses: []
  529. }),
  530. globals.MessageNotUnderstood);
  531. smalltalk.addMethod(
  532. smalltalk.method({
  533. selector: "receiver:",
  534. protocol: 'accessing',
  535. fn: function (anObject){
  536. var self=this;
  537. self["@receiver"]=anObject;
  538. return self
  539. },
  540. args: ["anObject"],
  541. source: "receiver: anObject\x0a\x09receiver := anObject",
  542. messageSends: [],
  543. referencedClasses: []
  544. }),
  545. globals.MessageNotUnderstood);
  546. smalltalk.addClass('NonBooleanReceiver', globals.Error, ['object'], 'Kernel-Exceptions');
  547. globals.NonBooleanReceiver.comment="NonBooleanReceiver exceptions may be thrown when executing inlined methods such as `#ifTrue:` with a non boolean receiver.";
  548. smalltalk.addMethod(
  549. smalltalk.method({
  550. selector: "object",
  551. protocol: 'accessing',
  552. fn: function (){
  553. var self=this;
  554. var $1;
  555. $1=self["@object"];
  556. return $1;
  557. },
  558. args: [],
  559. source: "object\x0a\x09^ object",
  560. messageSends: [],
  561. referencedClasses: []
  562. }),
  563. globals.NonBooleanReceiver);
  564. smalltalk.addMethod(
  565. smalltalk.method({
  566. selector: "object:",
  567. protocol: 'accessing',
  568. fn: function (anObject){
  569. var self=this;
  570. self["@object"]=anObject;
  571. return self
  572. },
  573. args: ["anObject"],
  574. source: "object: anObject\x0a\x09object := anObject",
  575. messageSends: [],
  576. referencedClasses: []
  577. }),
  578. globals.NonBooleanReceiver);
  579. smalltalk.addClass('PackageCommitError', globals.Error, [], 'Kernel-Exceptions');
  580. globals.PackageCommitError.comment="I get signaled when an attempt to commit a package has failed.";
  581. });