{"action":"created","issue":{"url":"https://api.github.com/repos/racket/htdp/issues/26","repository_url":"https://api.github.com/repos/racket/htdp","labels_url":"https://api.github.com/repos/racket/htdp/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/racket/htdp/issues/26/comments","events_url":"https://api.github.com/repos/racket/htdp/issues/26/events","html_url":"https://github.com/racket/htdp/issues/26","id":183877302,"number":26,"title":"Need better error messages for ridiculous font sizes","user":{"login":"bennn","id":1731829,"avatar_url":"https://avatars.githubusercontent.com/u/1731829?v=3","gravatar_id":"","url":"https://api.github.com/users/bennn","html_url":"https://github.com/bennn","followers_url":"https://api.github.com/users/bennn/followers","following_url":"https://api.github.com/users/bennn/following{/other_user}","gists_url":"https://api.github.com/users/bennn/gists{/gist_id}","starred_url":"https://api.github.com/users/bennn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bennn/subscriptions","organizations_url":"https://api.github.com/users/bennn/orgs","repos_url":"https://api.github.com/users/bennn/repos","events_url":"https://api.github.com/users/bennn/events{/privacy}","received_events_url":"https://api.github.com/users/bennn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-19T06:36:58Z","updated_at":"2016-11-24T16:38:11Z","closed_at":"2016-11-24T16:38:11Z","body":"On the v6.6 release,\n\nif I try to make the font size negative using `ctrl+-`, I get the message:\n\n```\neditor:set-current-preferred-font-size: contract violation\n  expected: exact-nonnegative-integer?\n  given: -1\n  in: the 1st argument of\n      (-> exact-nonnegative-integer? void?)\n  contract from: \n      <pkgs>/gui-lib/framework/main.rkt\n  blaming: <pkgs>/drracket/drracket/private/unit.rkt\n   (assuming the contract is correct)\n  at: <pkgs>/gui-lib/framework/main.rkt:1556.2\n  context...:\n   /Applications/Racket v6.6/collects/racket/contract/private/blame.rkt:159:0: raise-blame-error16\n   /Applications/Racket v6.6/collects/racket/contract/private/arrow-val-first.rkt:357:18\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:736:2: core502\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:508:2: chain-handle-key-event method in keymap%\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:496:4: for-loop\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:508:2: chain-handle-key-event method in keymap%\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:496:4: for-loop\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:508:2: chain-handle-key-event method in keymap%\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:459:2: handle-key-event method in keymap%\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxmenu.rkt:54:22\n   /Applications/Racket v6.6/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization\n   /Applications/Racket v6.6/collects/ffi/unsafe/atomic.rkt:72:13\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/mrtop.rkt:182:24: on-subwindow-char method in frame%\n   /Applications/Racket v6.6/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization\n   /Applications/Racket v6.6/collects/ffi/unsafe/atomic.rkt:72:13\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wx/cocoa/window.rkt:821:4: call-pre-on-char method in window%\n   ...\n```\n\nand if I try to go very very positive, I get a different error:\n\n```\npreferences:set: new value doesn't satisfy preferences:set-default predicate\n  pref sym: 'framework:standard-style-list:font-size\n  given: '#(#hash((((1366 745) (2556 1417)) . 24) (((1362 745)) . 256)) 256)\n  predicate: (vector/c (hash/c (non-empty-listof (list/c exact-nonnegative-integer? exact-nonnegative-integer?)) (integer-in 0 255) #:flat? #t) (integer-in 0 255) #:flat? #t)\n  context...:\n   /Applications/Racket v6.6/share/pkgs/gui-lib/framework/preferences.rkt:137:6\n   /Applications/Racket v6.6/collects/racket/private/map.rkt:47:13: for-each\n   /Applications/Racket v6.6/share/pkgs/gui-lib/framework/preferences.rkt:135:3\n   /Applications/Racket v6.6/collects/racket/contract/private/arrow-val-first.rkt:357:18\n   /Applications/Racket v6.6/collects/racket/contract/private/arrow-val-first.rkt:357:18\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:736:2: core502\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:508:2: chain-handle-key-event method in keymap%\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:496:4: for-loop\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:508:2: chain-handle-key-event method in keymap%\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:496:4: for-loop\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:508:2: chain-handle-key-event method in keymap%\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxme/keymap.rkt:459:2: handle-key-event method in keymap%\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/wxmenu.rkt:54:22\n   /Applications/Racket v6.6/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization\n   /Applications/Racket v6.6/collects/ffi/unsafe/atomic.rkt:72:13\n   /Applications/Racket v6.6/share/pkgs/gui-lib/mred/private/mrtop.rkt:182:24: on-subwindow-char method in frame%\n   ...\n```\n\nI would prefer these gave shorter error messages & did not print to stderr (stderr prints always confuse the Windows students).\n"},"comment":{"url":"https://api.github.com/repos/racket/htdp/issues/comments/262814335","html_url":"https://github.com/racket/htdp/issues/26#issuecomment-262814335","issue_url":"https://api.github.com/repos/racket/htdp/issues/26","id":262814335,"user":{"login":"rfindler","id":399024,"avatar_url":"https://avatars.githubusercontent.com/u/399024?v=3","gravatar_id":"","url":"https://api.github.com/users/rfindler","html_url":"https://github.com/rfindler","followers_url":"https://api.github.com/users/rfindler/followers","following_url":"https://api.github.com/users/rfindler/following{/other_user}","gists_url":"https://api.github.com/users/rfindler/gists{/gist_id}","starred_url":"https://api.github.com/users/rfindler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfindler/subscriptions","organizations_url":"https://api.github.com/users/rfindler/orgs","repos_url":"https://api.github.com/users/rfindler/repos","events_url":"https://api.github.com/users/rfindler/events{/privacy}","received_events_url":"https://api.github.com/users/rfindler/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T16:38:11Z","updated_at":"2016-11-24T16:38:11Z","body":"https://github.com/racket/drracket/commit/180b02640f33916a2158cb7b90c1d34cc93ca6af"}}
{"actor":{"display_login":"rfindler"}}