Overview
Comment: | Completely refactor the 'package unknown' handler error handling. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
7a658563b409a52f167b519d34185e31 |
User & Date: | mistachkin on 2016-08-17 05:27:03 |
Other Links: | manifest | tags |
Context
2016-08-17
| ||
06:18 | Do not try to auto-hook the 'package unknown' handler if it is already hooked. check-in: e7c21e360a user: mistachkin tags: trunk | |
05:27 | Completely refactor the 'package unknown' handler error handling. check-in: 7a658563b4 user: mistachkin tags: trunk | |
02:27 | Adjust comments. check-in: 607e185516 user: mistachkin tags: trunk | |
Changes
Modified client/pkgr.eagle from [c24c2305f9] to [a9e801c84e].
︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + | # NOTE: This package absolutely requires the Eagle core script library # package, even when it is being used by native Tcl. If needed, # prior to loading this package, the native Tcl auto-path should # be modified to include the "Eagle1.0" directory (i.e. the one # containing the Eagle core script library file "init.eagle"). # package require Eagle.Library proc formatPackageName { package version } { return [string trim [appendArgs \ $package " " [getLookupVersion $version]]] } proc formatResult { code result } { switch -exact -- $code { 0 {set codeString ok} 1 {set codeString error} 2 {set codeString return} 3 {set codeString break} 4 {set codeString continue} default {set codeString [appendArgs unknown( $code )]} } if {[string length $result] > 0} then { return [appendArgs $codeString ": " [list $result]] } else { return $codeString } } proc pkgLog { string } { catch { tclLog [appendArgs [pid] " : " [clock seconds] " : pkgr : " $string] } } proc stringIsList { value } { if {[isEagle]} then { return [string is list $value] } else { global tcl_version |
︙ | |||
759 760 761 762 763 764 765 766 767 768 | 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 | + + - - + + - - - - - - + - - - - - - - - - - - - - - - + + + + + - - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - + + + + + + - - - - + - - - + + - - - - - + + - - - - + + + + - - + - - + - - - + + + | # # NOTE: This version argument to this procedure must be optional, because # Eagle does not add a version argument when one is not supplied to # the [package require] sub-command itself. # proc packageUnknownHandler { package {version ""} } { variable verboseUnknownResult # # NOTE: First, run our [package unknown] handler. # |
︙ | |||
888 889 890 891 892 893 894 895 896 897 898 899 900 901 | 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 | + + + + + + + + + + | # when called from the [package unknown] handler? # variable strictUnknownLanguage; # DEFAULT: true if {![info exists strictUnknownLanguage]} then { set strictUnknownLanguage true } # # NOTE: Emit diagnostic messages when a [package unknown] handler # is called? # variable verboseUnknownResult; # DEFAULT: false if {![info exists verboseUnknownResult]} then { set verboseUnknownResult false } } proc main { package version caller } { # # NOTE: Issue the lookup request to the remote package repository. # set data [getLookupData \ |
︙ |
Modified client/pkgr.eagle.harpy from [bf0d393649] to [f7f47c423a].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> |