Skip to content
Tcl Source Code History Of Ticket c128108271
Login

History Of Ticket c128108271

Artifacts Associated With Ticket c128108271

  1. Ticket change [ee6ab741b1] (rid 147983) by adrianmedranocalvo on 2016-07-13 07:49:14:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      At the moment "trap" clauses in the "try" command must exactly match the -errorcode prefix.  It would be useful being able to specify glob patterns for each of the -errorcode words.
      
      For example, given two TclOO subclasses implementing an interface (e.g. they share the superclass), we might want to prefix all -errorcodes with the class name similarly to how Tcl core prefixes all its errors with TCL.  Trapping an error from either subclass can be done at the moment as follows:
      
      try {
          $a feed $x;
      } trap {::cow BADFOOD} {} - trap {::human BADFOOD} {} {
          $a drink;
      }
      
      This becomes an issue when when adding a new ::animal subclass ::fly: the code above must be changed to take it into account.
      
      If globbing were allowed in trap patterns, the same could be accomplished as follows:
      
      try {
          $a feed $x;
      } trap {* BADFOOD} {} {
          $a drink
      }
      
      This new behaviour could be specified via a flag similar to switch's -glob and -regexp.
      
    5. foundin initialized to: "8.6"
    6. is_private initialized to: "0"
    7. login: "adrianmedranocalvo"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "7e3820ed81064cf9306d34dd9be1633e66f1a08b"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "adrianmedranocalvo"
    14. subsystem initialized to: "None"
    15. title initialized to: "Allow globs in trap patterns"
    16. type initialized to: "RFE"
  2. Ticket change [81762af683] (rid 148018) by dkf on 2016-07-14 08:09:27:

    1. assignee changed to: "dkf"
    2. icomment:
      Why not use the class name as a suffix? Then the existing prefix machinery will “just work”.
      
    3. login: "dkf"
    4. mimetype: "text/x-fossil-wiki"
    5. subsystem changed to: "18. Commands M-Z"
    6. username: "dkf"