1384 errorString:msg |
1382 errorString:msg |
1385 in:suspendedContext. |
1383 in:suspendedContext. |
1386 |
1384 |
1387 ! ! |
1385 ! ! |
1388 |
1386 |
|
1387 !GenericException methodsFor:'default values'! |
|
1388 |
|
1389 defaultResumeValue |
|
1390 ^ nil |
|
1391 ! |
|
1392 |
|
1393 defaultReturnValue |
|
1394 ^ nil |
|
1395 ! ! |
|
1396 |
1389 !GenericException methodsFor:'handler actions'! |
1397 !GenericException methodsFor:'handler actions'! |
1390 |
1398 |
1391 proceed |
1399 proceed |
1392 "Continue after the raise - the raise returns nil" |
1400 "Continue after the raise - the raise returns nil" |
1393 |
1401 |
1394 self proceedWith:nil. |
1402 self proceedWith:(self defaultResumeValue). |
1395 |
1403 |
1396 "cg: a strange example: |
1404 "cg: a strange example: |
1397 there are two cought errors here - can you spot them ? |
1405 there are two cought errors here - can you spot them ? |
1398 |
1406 |
1399 Object errorSignal handle:[:ex| |
1407 Object errorSignal handle:[:ex| |
1605 "Continue after the raise - the raise returns nil |
1613 "Continue after the raise - the raise returns nil |
1606 obsolete (use #proceed), retained for backwards compatibility" |
1614 obsolete (use #proceed), retained for backwards compatibility" |
1607 |
1615 |
1608 <resource:#obsolete> |
1616 <resource:#obsolete> |
1609 |
1617 |
1610 self obsoleteMethodWarning:'use #proceed'. |
1618 "/ self obsoleteMethodWarning:'use #proceed'. "/ nope - ANSI defines #resume - sigh |
1611 ^ self proceedWith:nil |
1619 ^ self proceedWith:(self defaultResumeValue) |
1612 |
1620 |
1613 "Modified: / 2.3.1998 / 10:51:55 / stefan" |
1621 "Modified: / 2.3.1998 / 10:51:55 / stefan" |
1614 ! |
1622 ! |
1615 |
1623 |
1616 resumeWith:value |
1624 resumeWith:value |
1617 "Continue after the raise - the raise returns value |
1625 "Continue after the raise - the raise returns value |
1618 obsolete (use #proceedWith:), retained for backwards compatibility" |
1626 obsolete (use #proceedWith:), retained for backwards compatibility" |
1619 |
1627 |
1620 <resource:#obsolete> |
1628 <resource:#obsolete> |
1621 |
1629 |
1622 self obsoleteMethodWarning:'use #proceedWith:'. |
1630 "/ self obsoleteMethodWarning:'use #proceedWith:'. "/ nope - ANSI defines #resume: - sigh |
1623 ^ self proceedWith:value |
1631 ^ self proceedWith:value |
1624 |
1632 |
1625 "Modified: / 2.3.1998 / 10:51:48 / stefan" |
1633 "Modified: / 2.3.1998 / 10:51:48 / stefan" |
1626 ! |
1634 ! |
1627 |
1635 |