/usr/share/doc/racket/reference/exns.html is in racket-doc 6.7-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>10.2 Exceptions</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.css" title="default"/><link rel="stylesheet" type="text/css" href="icons.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">The Racket Reference</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2 </td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3 </td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4 </td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5 </td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6 </td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7 </td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8 </td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9 </td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10 </td><td><a href="control.html" class="tocviewselflink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11 </td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12 </td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13 </td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14 </td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15 </td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16 </td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17 </td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18 </td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">▼</a></td><td>10 </td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">10.1 </td><td><a href="values.html" class="tocviewlink" data-pltdoc="x">Multiple Values</a></td></tr><tr><td align="right">10.2 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Exceptions</a></td></tr><tr><td align="right">10.3 </td><td><a href="Delayed_Evaluation.html" class="tocviewlink" data-pltdoc="x">Delayed Evaluation</a></td></tr><tr><td align="right">10.4 </td><td><a href="cont.html" class="tocviewlink" data-pltdoc="x">Continuations</a></td></tr><tr><td align="right">10.5 </td><td><a href="contmarks.html" class="tocviewlink" data-pltdoc="x">Continuation Marks</a></td></tr><tr><td align="right">10.6 </td><td><a href="breakhandler.html" class="tocviewlink" data-pltdoc="x">Breaks</a></td></tr><tr><td align="right">10.7 </td><td><a href="Exiting.html" class="tocviewlink" data-pltdoc="x">Exiting</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_2");">►</a></td><td>10.2 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Exceptions</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">10.2.1 </td><td><a href="#%28part._err-msg-conventions%29" class="tocviewlink" data-pltdoc="x">Error Message Conventions</a></td></tr><tr><td align="right">10.2.2 </td><td><a href="#%28part._errorproc%29" class="tocviewlink" data-pltdoc="x">Raising Exceptions</a></td></tr><tr><td align="right">10.2.3 </td><td><a href="#%28part._.Handling_.Exceptions%29" class="tocviewlink" data-pltdoc="x">Handling Exceptions</a></td></tr><tr><td align="right">10.2.4 </td><td><a href="#%28part._.Configuring_.Default_.Handling%29" class="tocviewlink" data-pltdoc="x">Configuring Default Handling</a></td></tr><tr><td align="right">10.2.5 </td><td><a href="#%28part._.Built-in_.Exception_.Types%29" class="tocviewlink" data-pltdoc="x">Built-<wbr></wbr>in Exception Types</a></td></tr><tr><td align="right">10.2.6 </td><td><a href="#%28part._.Additional_.Exception_.Functions%29" class="tocviewlink" data-pltdoc="x">Additional Exception Functions</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">10.2.1<tt> </tt></span><a href="#%28part._err-msg-conventions%29" class="tocsubseclink" data-pltdoc="x">Error Message Conventions</a></td></tr><tr><td><span class="tocsublinknumber">10.2.2<tt> </tt></span><a href="#%28part._errorproc%29" class="tocsubseclink" data-pltdoc="x">Raising Exceptions</a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">raise</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">error</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._raise-user-error%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">raise-<wbr></wbr>user-<wbr></wbr>error</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._raise-argument-error%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">raise-<wbr></wbr>argument-<wbr></wbr>error</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._raise-result-error%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">raise-<wbr></wbr>result-<wbr></wbr>error</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._raise-arguments-error%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">raise-<wbr></wbr>arguments-<wbr></wbr>error</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._raise-range-error%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">raise-<wbr></wbr>range-<wbr></wbr>error</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._raise-type-error%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">raise-<wbr></wbr>type-<wbr></wbr>error</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._raise-mismatch-error%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">raise-<wbr></wbr>mismatch-<wbr></wbr>error</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._raise-arity-error%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">raise-<wbr></wbr>arity-<wbr></wbr>error</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._raise-syntax-error%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">raise-<wbr></wbr>syntax-<wbr></wbr>error</span></span></a></td></tr><tr><td><span class="tocsublinknumber">10.2.3<tt> </tt></span><a href="#%28part._.Handling_.Exceptions%29" class="tocsubseclink" data-pltdoc="x">Handling Exceptions</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._call-with-exception-handler%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">call-<wbr></wbr>with-<wbr></wbr>exception-<wbr></wbr>handler</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._uncaught-exception-handler%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">uncaught-<wbr></wbr>exception-<wbr></wbr>handler</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">with-<wbr></wbr>handlers</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%2A%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">with-<wbr></wbr>handlers*</span></span></a></td></tr><tr><td><span class="tocsublinknumber">10.2.4<tt> </tt></span><a href="#%28part._.Configuring_.Default_.Handling%29" class="tocsubseclink" data-pltdoc="x">Configuring Default Handling</a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._error-escape-handler%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">error-<wbr></wbr>escape-<wbr></wbr>handler</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._error-display-handler%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">error-<wbr></wbr>display-<wbr></wbr>handler</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._error-print-width%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">error-<wbr></wbr>print-<wbr></wbr>width</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._error-print-context-length%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">error-<wbr></wbr>print-<wbr></wbr>context-<wbr></wbr>length</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._error-value-~3estring-handler%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">error-<wbr></wbr>value-<wbr></wbr>>string-<wbr></wbr>handler</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._error-print-source-location%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">error-<wbr></wbr>print-<wbr></wbr>source-<wbr></wbr>location</span></span></a></td></tr><tr><td><span class="tocsublinknumber">10.2.5<tt> </tt></span><a href="#%28part._.Built-in_.Exception_.Types%29" class="tocsubseclink" data-pltdoc="x">Built-<wbr></wbr>in Exception Types</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>contract</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3aarity%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>contract:<span class="mywbr"> </span>arity</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3adivide-by-zero%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>contract:<span class="mywbr"> </span>divide-<wbr></wbr>by-<wbr></wbr>zero</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3anon-fixnum-result%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>contract:<span class="mywbr"> </span>non-<wbr></wbr>fixnum-<wbr></wbr>result</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3acontinuation%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>contract:<span class="mywbr"> </span>continuation</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3avariable%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>contract:<span class="mywbr"> </span>variable</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>syntax</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax~3aunbound%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>syntax:<span class="mywbr"> </span>unbound</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax~3amissing-module%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>syntax:<span class="mywbr"> </span>missing-<wbr></wbr>module</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>read</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread~3aeof%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>read:<span class="mywbr"> </span>eof</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread~3anon-char%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>read:<span class="mywbr"> </span>non-<wbr></wbr>char</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>filesystem</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3aexists%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>filesystem:<span class="mywbr"> </span>exists</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3aversion%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>filesystem:<span class="mywbr"> </span>version</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3aerrno%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>filesystem:<span class="mywbr"> </span>errno</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3amissing-module%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>filesystem:<span class="mywbr"> </span>missing-<wbr></wbr>module</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>network</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork~3aerrno%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>network:<span class="mywbr"> </span>errno</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aout-of-memory%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>out-<wbr></wbr>of-<wbr></wbr>memory</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aunsupported%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>unsupported</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3auser%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>user</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>break</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak~3ahang-up%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>break:<span class="mywbr"> </span>hang-<wbr></wbr>up</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak~3aterminate%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>break:<span class="mywbr"> </span>terminate</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._prop~3aexn~3asrclocs%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">prop:<span class="mywbr"> </span>exn:<span class="mywbr"> </span>srclocs</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3asrclocs~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>srclocs?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3asrclocs-accessor%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>srclocs-<wbr></wbr>accessor</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">srcloc</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._srcloc-~3estring%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">srcloc-<wbr></wbr>>string</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._prop~3aexn~3amissing-module%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">prop:<span class="mywbr"> </span>exn:<span class="mywbr"> </span>missing-<wbr></wbr>module</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3amissing-module~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>missing-<wbr></wbr>module?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3amissing-module-accessor%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>missing-<wbr></wbr>module-<wbr></wbr>accessor</span></span></a></td></tr><tr><td><span class="tocsublinknumber">10.2.6<tt> </tt></span><a href="#%28part._.Additional_.Exception_.Functions%29" class="tocsubseclink" data-pltdoc="x">Additional Exception Functions</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fexn..rkt%29._exn-~3estring%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym">exn-<wbr></wbr>>string</span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="values.html" title="backward to "10.1 Multiple Values"" data-pltdoc="x">← prev</a> <a href="control.html" title="up to "10 Control Flow"" data-pltdoc="x">up</a> <a href="Delayed_Evaluation.html" title="forward to "10.3 Delayed Evaluation"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""exns"">10.2<tt> </tt><a name="(part._exns)"></a>Exceptions</h4><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="imageleft"><img src="finger.png" alt="+" width="24" height="24"/></span><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=exns.html&version=6.7" class="Sq" data-pltdoc="x">Exceptions</a> in <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=index.html&version=6.7" class="Sq" data-pltdoc="x"><span style="font-weight: bold">The Racket Guide</span></a> introduces exceptions.</p></blockquote></blockquote></blockquote><p>See <a href="eval-model.html#%28part._exn-model%29" data-pltdoc="x">Exceptions</a> for information on the Racket exception
model. It is based on a proposal by Friedman, Haynes, and Dybvig
[<a href="doc-bibliography.html#%28cite._.Friedman95%29" data-pltdoc="x">Friedman95</a>].</p><p>Whenever a primitive error occurs in Racket, an exception is
raised. The value that is passed to the current <a href="eval-model.html#%28tech._exception._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">exception
handler</span></a> for a primitive error is always an instance of the
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn%29%29" class="RktValLink" data-pltdoc="x">exn</a></span> structure type. Every <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn%29%29" class="RktValLink" data-pltdoc="x">exn</a></span> structure value has a
<span class="RktSym">message</span> field that is a string, the primitive error message.
The default exception handler recognizes exception values with the
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3f%29%29" class="RktValLink" data-pltdoc="x">exn?</a></span> predicate and passes the error message to the current
<a href="#%28tech._error._display._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error display handler</span></a> (see <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-display-handler%29%29" class="RktValLink" data-pltdoc="x">error-display-handler</a></span>).</p><p>Primitive procedures that accept a procedure argument with a
particular required arity (e.g., <span class="RktSym"><a href="file-ports.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._call-with-input-file%29%29" class="RktValLink" data-pltdoc="x">call-with-input-file</a></span>,
<span class="RktSym"><a href="cont.html#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._call%2Fcc%29%29" class="RktValLink" data-pltdoc="x">call/cc</a></span>) check the argument’s arity immediately, raising
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> if the arity is incorrect.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""err-msg-conventions"">10.2.1<tt> </tt><a name="(part._err-msg-conventions)"></a>Error Message Conventions</h5><p>Racket’s <a name="(tech._error._message._convention)"></a><span style="font-style: italic">error message convention</span> is to produce error
messages with the following shape:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="sroman">‹<span style="font-style: italic">srcloc</span>›</span><span class="RktSym">:</span><span class="hspace"> </span><span class="sroman">‹<span style="font-style: italic">name</span>›</span><span class="RktSym">:</span><span class="hspace"> </span><span class="sroman">‹<span style="font-style: italic">message</span>›</span><span class="stt">;</span></td></tr><tr><td><span class="hspace"> </span><span class="sroman">‹<span style="font-style: italic">continued-message</span>›</span><span class="hspace"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span></td></tr><tr><td><span class="hspace"> </span><span class="sroman">‹<span style="font-style: italic">field</span>›</span><span class="RktSym">:</span><span class="hspace"> </span><span class="sroman">‹<span style="font-style: italic">detail</span>›</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span></td></tr></table></blockquote><p>The message starts with an optional source location, <span class="sroman">‹<span style="font-style: italic">srcloc</span>›</span>,
which is followed by a colon and space when present. The message
continues with an optional <span class="sroman">‹<span style="font-style: italic">name</span>›</span> that usually identifies the
complaining function, syntactic form, or other entity, but may also
refer to an entity being complained about; the <span class="sroman">‹<span style="font-style: italic">name</span>›</span> is also
followed by a colon and space when present.</p><p>The <span class="sroman">‹<span style="font-style: italic">message</span>›</span> should be relatively short, and it should be
largely independent of specific values that triggered the error. More
detailed explanation that requires multiple lines should continue with
each line indented by a single space, in which case <span class="sroman">‹<span style="font-style: italic">message</span>›</span>
should end in a semi-colon (but the semi-colon should be omitted if
<span class="sroman">‹<span style="font-style: italic">continued-message</span>›</span> is not present). Message text should be
lowercase—<wbr></wbr>using semi-colons to separate sentences if needed,
although long explanations may be better deferred to extra fields.</p><p>Specific values that triggered the error or other helpful information
should appear in separate <span class="sroman">‹<span style="font-style: italic">field</span>›</span> lines, each of which is
indented by two spaces. If a <span class="sroman">‹<span style="font-style: italic">detail</span>›</span> is especially long or
takes multiple lines, it should start on its own line after the
<span class="sroman">‹<span style="font-style: italic">field</span>›</span> label, and each of its lines should be indented by
three spaces. Field names should be all lowercase.</p><p>A <span class="sroman">‹<span style="font-style: italic">field</span>›</span> name should end with <span class="RktInBG"><span class="hspace"></span><span class="RktIn">...</span><span class="hspace"></span></span> if the field
provides relatively detailed information that might be distracting in
common cases but useful in others. For example, when a contract
failure is reported for a particular argument of a function, other
arguments to the function might be shown in an “other arguments...”
field. The intent is that fields whose names end in <span class="RktInBG"><span class="hspace"></span><span class="RktIn">...</span><span class="hspace"></span></span>
might be hidden by default in an environment such as DrRacket.</p><p>Make <span class="sroman">‹<span style="font-style: italic">field</span>›</span> names as short as possible, relying on
<span class="sroman">‹<span style="font-style: italic">message</span>›</span> or <span class="sroman">‹<span style="font-style: italic">continued message</span>›</span> text to clarify the
meaning for a field. For example, prefer “given” to “given turtle”
as a field name, where <span class="sroman">‹<span style="font-style: italic">message</span>›</span> is something like “given
turtle is too sleepy” to clarify that “given” refers to a turtle.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""errorproc"">10.2.2<tt> </tt><a name="(part._errorproc)"></a>Raising Exceptions</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._raise))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>[<span class="RktVar">barrier?</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">barrier?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Raises an exception, where <span class="RktVar">v</span> represents the exception being
raised. The <span class="RktVar">v</span> argument can be anything; it is passed to the
current <a href="eval-model.html#%28tech._exception._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">exception handler</span></a>.</div></p><p>If <span class="RktVar">barrier?</span> is true, then the call to the <a href="eval-model.html#%28tech._exception._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">exception
handler</span></a> is protected by a <a href="eval-model.html#%28tech._continuation._barrier%29" class="techoutside" data-pltdoc="x"><span class="techinside">continuation barrier</span></a>, so that
multiple returns/escapes are impossible. All exceptions raised by
<a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a> functions effectively use <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span> with a
<span class="RktVal">#t</span> value for <span class="RktVar">barrier?</span>.</p><p>Breaks are disabled from the time the exception is raised until the
exception handler obtains control, and the handler itself is
<span class="RktSym"><a href="breakhandler.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._parameterize-break%29%29" class="RktStxLink" data-pltdoc="x">parameterize-break</a></span>ed to disable breaks initially; see
<a href="breakhandler.html" data-pltdoc="x">Breaks</a> for more information on breaks.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="RktStxLink" data-pltdoc="x">with-handlers</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._number~3f%29%29" class="RktValLink" data-pltdoc="x">number?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">n</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._%2B%29%29" class="RktValLink" data-pltdoc="x">+</a></span><span class="hspace"> </span><span class="RktSym">n</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span><span class="hspace"> </span><span class="RktVal">18</span><span class="hspace"> </span><span class="RktVal">#t</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">23</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define-struct%29%29" class="RktStxLink" data-pltdoc="x">define-struct</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">my-exception</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3auser%29%29" class="RktValLink" data-pltdoc="x">exn:fail:user</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="RktStxLink" data-pltdoc="x">with-handlers</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">my-exception?</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._%2B%29%29" class="RktValLink" data-pltdoc="x">+</a></span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">make-my-exception</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">"failed"</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="contmarks.html#%28def._%28%28quote._~23~25kernel%29._current-continuation-marks%29%29" class="RktValLink" data-pltdoc="x">current-continuation-marks</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">failed</span><span class="hspace"> </span><span class="RktVal">#t</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">uncaught exception: failed</span></p></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._error))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValDef RktValLink" data-pltdoc="x">error</a></span></span><span class="hspace"> </span><span class="RktVar">sym</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">sym</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValDef RktValLink" data-pltdoc="x">error</a></span></span><span class="hspace"> </span><span class="RktVar">msg</span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">msg</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValDef RktValLink" data-pltdoc="x">error</a></span></span><span class="hspace"> </span><span class="RktVar">src</span><span class="hspace"> </span><span class="RktVar">format</span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">src</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">format</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Raises the exception <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="RktValLink" data-pltdoc="x">exn:fail</a></span>, which contains an error
string. The different forms produce the error string in different
ways:</div></p><ul><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValLink" data-pltdoc="x">error</a></span><span class="stt"> </span><span class="RktVar">sym</span><span class="RktPn">)</span> creates a message string by concatenating
<span class="RktVal">"error: "</span> with the string form of <span class="RktVar">sym</span>. Use this
form sparingly.</p></li><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValLink" data-pltdoc="x">error</a></span><span class="stt"> </span><span class="RktVar">msg</span><span class="stt"> </span><span class="RktVar">v</span><span class="stt"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span> creates a message string by
concatenating <span class="RktVar">msg</span> with string versions of the <span class="RktVar">v</span>s
(as produced by the current error value conversion handler; see
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-value-~3estring-handler%29%29" class="RktValLink" data-pltdoc="x">error-value->string-handler</a></span>). A space is inserted before
each <span class="RktVar">v</span>. Use this form sparingly, because it does not conform
well to Racket’s <a href="#%28tech._error._message._convention%29" class="techoutside" data-pltdoc="x"><span class="techinside">error message conventions</span></a>; consider
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-arguments-error%29%29" class="RktValLink" data-pltdoc="x">raise-arguments-error</a></span>, instead. </p></li><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValLink" data-pltdoc="x">error</a></span><span class="stt"> </span><span class="RktVar">src</span><span class="stt"> </span><span class="RktSym">frmat</span><span class="stt"> </span><span class="RktVar">v</span><span class="stt"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span> creates a
message string equivalent to the string created by</p><blockquote class="SCodeFlow"><p><span class="RktPn">(</span><span class="RktVar">format</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string-append%29%29" class="RktValLink" data-pltdoc="x">string-append</a></span><span class="hspace"> </span><span class="RktVal">"~s: "</span><span class="hspace"> </span><span class="RktSym">frmat</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">src</span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span></p></blockquote><p>When possible, use functions such as <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-argument-error%29%29" class="RktValLink" data-pltdoc="x">raise-argument-error</a></span>,
instead, which construct messages that follow Racket’s <a href="#%28tech._error._message._convention%29" class="techoutside" data-pltdoc="x"><span class="techinside">error message
conventions</span></a>.</p></li></ul><p>In all cases, the constructed message string is passed to
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail</a></span>, and the resulting exception is raised.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValLink" data-pltdoc="x">error</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">failed</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">error: failed</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValLink" data-pltdoc="x">error</a></span><span class="hspace"> </span><span class="RktVal">"failed"</span><span class="hspace"> </span><span class="RktVal">23</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">pizza</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">failed 23 pizza (1 2 3)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValLink" data-pltdoc="x">error</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">method-a</span><span class="hspace"> </span><span class="RktVal">"failed because ~a"</span><span class="hspace"> </span><span class="RktVal">"no argument supplied"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">method-a: failed because no argument supplied</span></p></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._raise-user-error))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-user-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-user-error</a></span></span><span class="hspace"> </span><span class="RktVar">sym</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">sym</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-user-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-user-error</a></span></span><span class="hspace"> </span><span class="RktVar">msg</span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">msg</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-user-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-user-error</a></span></span><span class="hspace"> </span><span class="RktVar">src</span><span class="hspace"> </span><span class="RktVar">format</span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">src</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">format</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValLink" data-pltdoc="x">error</a></span>, but constructs an exception with
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3auser%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:user</a></span> instead of <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail</a></span>. The
default <a href="#%28tech._error._display._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error display handler</span></a> does not show a “stack trace” for
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3auser%29%29" class="RktValLink" data-pltdoc="x">exn:fail:user</a></span> exceptions (see <a href="contmarks.html" data-pltdoc="x">Continuation Marks</a>), so
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-user-error%29%29" class="RktValLink" data-pltdoc="x">raise-user-error</a></span> should be used for errors that are intended
for end users.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._raise-argument-error))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-argument-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-argument-error</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-argument-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-argument-error</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">name</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">expected</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">bad-pos</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">bad-pos</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Creates an <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> value and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span>s it as
an exception. The <span class="RktVar">name</span> argument is used as the source
procedure’s name in the error message. The <span class="RktVar">expected</span> argument
is used as a description of the expected contract (i.e., as a string,
but the string is intended to contain a contract expression).</div></p><p>In the first form, <span class="RktVar">v</span> is the value received by the procedure
that does not have the expected type.</p><p>In the second form, the bad argument is indicated by an index
<span class="RktVar">bad-pos</span> (counting from <span style="font-style: italic"></span>0<span style="font-style: italic"></span>), and all of the original
arguments <span class="RktVar">v</span> are provided (in order). The resulting error
message names the bad argument and also lists the other arguments. If
<span class="RktVar">bad-pos</span> is not less than the number of <span class="RktVar">v</span>s, the
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">feed-machine</span><span class="hspace"> </span><span class="RktSym">bits</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="if.html#%28form._%28%28quote._~23~25kernel%29._if%29%29" class="RktStxLink" data-pltdoc="x">if</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._not%29%29" class="RktValLink" data-pltdoc="x">not</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._integer~3f%29%29" class="RktValLink" data-pltdoc="x">integer?</a></span><span class="hspace"> </span><span class="RktSym">bits</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-argument-error%29%29" class="RktValLink" data-pltdoc="x">raise-argument-error</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">feed-machine</span><span class="hspace"> </span><span class="RktVal">"integer?"</span><span class="hspace"> </span><span class="RktSym">bits</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">"fed the machine"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">feed-machine</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">turkey</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">feed-machine: contract violation</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">expected: integer?</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">given: 'turkey</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">feed-cow</span><span class="hspace"> </span><span class="RktSym">animal</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="if.html#%28form._%28%28quote._~23~25kernel%29._if%29%29" class="RktStxLink" data-pltdoc="x">if</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._not%29%29" class="RktValLink" data-pltdoc="x">not</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span><span class="hspace"> </span><span class="RktSym">animal</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">cow</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-argument-error%29%29" class="RktValLink" data-pltdoc="x">raise-argument-error</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">feed-cow</span><span class="hspace"> </span><span class="RktVal">"'cow"</span><span class="hspace"> </span><span class="RktSym">animal</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">"fed the cow"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">feed-cow</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">turkey</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">feed-cow: contract violation</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">expected: 'cow</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">given: 'turkey</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">feed-animals</span><span class="hspace"> </span><span class="RktSym">cow</span><span class="hspace"> </span><span class="RktSym">sheep</span><span class="hspace"> </span><span class="RktSym">goose</span><span class="hspace"> </span><span class="RktSym">cat</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="if.html#%28form._%28%28quote._~23~25kernel%29._if%29%29" class="RktStxLink" data-pltdoc="x">if</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._not%29%29" class="RktValLink" data-pltdoc="x">not</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span><span class="hspace"> </span><span class="RktSym">goose</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">goose</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-argument-error%29%29" class="RktValLink" data-pltdoc="x">raise-argument-error</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">feed-animals</span><span class="hspace"> </span><span class="RktVal">"'goose"</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktSym">cow</span><span class="hspace"> </span><span class="RktSym">sheep</span><span class="hspace"> </span><span class="RktSym">goose</span><span class="hspace"> </span><span class="RktSym">cat</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">"fed the animals"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">feed-animals</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">cow</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sheep</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">dog</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">cat</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">feed-animals: contract violation</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">expected: 'goose</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">given: 'dog</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">argument position: 3rd</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">other arguments...:</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">'cow</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">'sheep</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">'cat</span></p></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._raise-result-error))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-result-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-result-error</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-result-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-result-error</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">name</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">expected</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">bad-pos</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">bad-pos</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-argument-error%29%29" class="RktValLink" data-pltdoc="x">raise-argument-error</a></span>, but the error message describe <span class="RktVar">v</span>
as a “result” instead of an “argument.”</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._raise-arguments-error))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-arguments-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-arguments-error</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">name</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">message</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">field</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktMeta">...</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">message</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">field</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Creates an <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> value and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span>s it as
an exception. The <span class="RktVar">name</span> is used as the source procedure’s
name in the error message. The <span class="RktVar">message</span> is the error
message; if <span class="RktVar">message</span> contains newline characters, each extra line should be
suitably indented (with one extra space at the start of each line), but it should not end with a newline character.
Each <span class="RktVar">field</span> must have a corresponding <span class="RktVar">v</span>,
and the two are rendered on their own
line in the error message, with each <span class="RktVar">v</span> formatted
using the error value conversion handler (see
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-value-~3estring-handler%29%29" class="RktValLink" data-pltdoc="x">error-value->string-handler</a></span>).</div></p><p><div class="SIntrapara">Example:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-arguments-error%29%29" class="RktValLink" data-pltdoc="x">raise-arguments-error</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">eat</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">"fish is smaller than its given meal"</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">"fish"</span><span class="hspace"> </span><span class="RktVal">12</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">"meal"</span><span class="hspace"> </span><span class="RktVal">13</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">eat: fish is smaller than its given meal</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">fish: 12</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">meal: 13</span></p></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._raise-range-error))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-range-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-range-error</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">name</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">type-description</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">index-prefix</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">index</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">in-value</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">lower-bound</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">upper-bound</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">alt-lower-bound</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">type-description</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">index-prefix</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">index</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in-value</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">lower-bound</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">upper-bound</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">alt-lower-bound</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates an <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> value and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span>s it as
an exception to report an out-of-range error. The <span class="RktVar">type-description</span>
string describes the value for which the index is meant to select an element,
and <span class="RktVar">index-prefix</span> is a prefix for the word “index.” The <span class="RktVar">index</span>
argument is the rejected index. The <span class="RktVar">in-value</span> argument is the value
for which the index was meant. The <span class="RktVar">lower-bound</span> and <span class="RktVar">upper-bound</span>
arguments specify the valid range of indices, inclusive; if <span class="RktVar">upper-bound</span>
is below <span class="RktVar">lower-bound</span>, the value is characterized as “empty.” If <span class="RktVar">alt-lower-bound</span>
is not <span class="RktVal">#f</span>, and if <span class="RktVar">index</span> is between <span class="RktVar">alt-lower-bound</span>
and <span class="RktVar">upper-bound</span>, then the error is report as <span class="RktVar">index</span> being less
than the “starting” index <span class="RktVar">lower-bound</span>.</div></p><p>Since <span class="RktVar">upper-bound</span> is inclusive, a typical value is <span style="font-style: italic">one
less than</span> the size of a collection—<wbr></wbr>for example, <span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._sub1%29%29" class="RktValLink" data-pltdoc="x">sub1</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="vectors.html#%28def._%28%28quote._~23~25kernel%29._vector-length%29%29" class="RktValLink" data-pltdoc="x">vector-length</a></span><span class="stt"> </span><span class="RktVar">vec</span><span class="RktPn">)</span><span class="RktPn">)</span>, <span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._sub1%29%29" class="RktValLink" data-pltdoc="x">sub1</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._length%29%29" class="RktValLink" data-pltdoc="x">length</a></span><span class="stt"> </span><span class="RktVar">lst</span><span class="RktPn">)</span><span class="RktPn">)</span>, and so on.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-range-error%29%29" class="RktValLink" data-pltdoc="x">raise-range-error</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">vector-ref</span><span class="hspace"> </span><span class="RktVal">"vector"</span><span class="hspace"> </span><span class="RktVal">"starting "</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">vector-ref: starting index is out of range</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">starting index: 5</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">valid range: [0, 3]</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">vector: '#(1 2 3 4)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-range-error%29%29" class="RktValLink" data-pltdoc="x">raise-range-error</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">vector-ref</span><span class="hspace"> </span><span class="RktVal">"vector"</span><span class="hspace"> </span><span class="RktVal">"ending "</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">vector-ref: ending index is out of range</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">ending index: 5</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">valid range: [0, 3]</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">vector: '#(1 2 3 4)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-range-error%29%29" class="RktValLink" data-pltdoc="x">raise-range-error</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">vector-ref</span><span class="hspace"> </span><span class="RktVal">"vector"</span><span class="hspace"> </span><span class="RktVal">""</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-1</span></span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">vector-ref: index is out of range for empty vector</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">index: 3</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-range-error%29%29" class="RktValLink" data-pltdoc="x">raise-range-error</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">vector-ref</span><span class="hspace"> </span><span class="RktVal">"vector"</span><span class="hspace"> </span><span class="RktVal">"ending "</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">vector-ref: ending index is smaller than starting index</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">ending index: 1</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">starting index: 2</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">valid range: [0, 3]</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">vector: '#(1 2 3 4)</span></p></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._raise-type-error))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-type-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-type-error</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-type-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-type-error</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span><span class="RktVar">bad-pos</span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">bad-pos</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-argument-error%29%29" class="RktValLink" data-pltdoc="x">raise-argument-error</a></span>, but with Racket’s old formatting
conventions, and where <span class="RktVar">expected</span> is used as a “type”
description instead of a contract expression. Use <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-argument-error%29%29" class="RktValLink" data-pltdoc="x">raise-argument-error</a></span>
or <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-result-error%29%29" class="RktValLink" data-pltdoc="x">raise-result-error</a></span>, instead.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._raise-mismatch-error))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-mismatch-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-mismatch-error</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">name</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">message</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...+</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktMeta">...+</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">message</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Similar to <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-arguments-error%29%29" class="RktValLink" data-pltdoc="x">raise-arguments-error</a></span>, but using Racket’s old
formatting conventions, with a required <span class="RktVar">v</span> immediately
after the first <span class="RktVar">message</span> string, and with further <span class="RktVar">message</span>
strings that are spliced into the message without line breaks or
space. Use <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-arguments-error%29%29" class="RktValLink" data-pltdoc="x">raise-arguments-error</a></span>, instead.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/private/base..rkt)._raise-arity-error))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._raise-arity-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-arity-error</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">arity-v</span><span class="hspace"> </span><span class="RktVar">arg-v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktSym"><a href="procedures.html#%28def._%28%28quote._~23~25kernel%29._procedure~3f%29%29" class="RktValLink" data-pltdoc="x">procedure?</a></span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">arity-v</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="procedures.html#%28def._%28%28quote._~23~25kernel%29._arity-at-least~3f%29%29" class="RktValLink" data-pltdoc="x">arity-at-least?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="procedures.html#%28def._%28%28quote._~23~25kernel%29._arity-at-least~3f%29%29" class="RktValLink" data-pltdoc="x">arity-at-least?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">arg-v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Creates an <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3aarity%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract:arity</a></span> value and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span>s
it as an exception. The <span class="RktVar">name</span> is used for the source
procedure’s name in the error message.</div></p><p>The <span class="RktVar">arity-v</span> value must
be a possible result from <span class="RktSym"><a href="procedures.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._procedure-arity%29%29" class="RktValLink" data-pltdoc="x">procedure-arity</a></span>, except
that it does not have to be normalized (see <span class="RktSym"><a href="procedures.html#%28def._%28%28quote._~23~25kernel%29._procedure-arity~3f%29%29" class="RktValLink" data-pltdoc="x">procedure-arity?</a></span> for
the details of normalized arities); <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._raise-arity-error%29%29" class="RktValLink" data-pltdoc="x">raise-arity-error</a></span>
will normalize the arity and use the normalized form in the error message.
If <span class="RktVar">name</span> is a procedure, its actual arity is
ignored.</p><p>The <span class="RktVar">arg-v</span> arguments are the actual supplied
arguments, which are shown in the error message (using the error value
conversion handler; see <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-value-~3estring-handler%29%29" class="RktValLink" data-pltdoc="x">error-value->string-handler</a></span>); also,
the number of supplied <span class="RktVar">arg-v</span>s is explicitly mentioned in the
message.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._raise-syntax-error))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-syntax-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">raise-syntax-error</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">name</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">message</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktVar">expr</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">sub-expr</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">extra-sources</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">message</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">expr</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">sub-expr</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">extra-sources</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="stxops.html#%28def._%28%28quote._~23~25kernel%29._syntax~3f%29%29" class="RktValLink" data-pltdoc="x">syntax?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Creates an <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax%29%29" class="RktValLink" data-pltdoc="x">exn:fail:syntax</a></span> value and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span>s it as an
exception. Macros use this procedure to report syntax errors.</div></p><p>The <span class="RktVar">name</span> argument is usually <span class="RktVal">#f</span> when <span class="RktVar">expr</span>
is provided; it is described in more detail below. The
<span class="RktVar">message</span> is used as the main body of the error message; if
<span class="RktVar">message</span> contains newline characters, each new line should be
suitably indented (with one space at the start), and it should not end with a newline character.</p><p>The optional <span class="RktVar">expr</span> argument is the erroneous source syntax
object or S-expression (but the expression <span class="RktVal">#f</span> cannot be
represented by itself; it must be wrapped as a <a href="syntax-model.html#%28tech._syntax._object%29" class="techoutside" data-pltdoc="x"><span class="techinside">syntax
object</span></a>). The optional <span class="RktVar">sub-expr</span> argument is a syntax object
or S-expression (again, <span class="RktVal">#f</span> cannot represent itself) within
<span class="RktVar">expr</span> that more precisely locates the error. Both may appear
in the generated error-message text if
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-print-source-location%29%29" class="RktValLink" data-pltdoc="x">error-print-source-location</a></span> is <span class="RktVal">#t</span>. Source location
information in the error-message text is similarly extracted from
<span class="RktVar">sub-expr</span> or <span class="RktVar">expr</span> when at least one is a syntax
object and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-print-source-location%29%29" class="RktValLink" data-pltdoc="x">error-print-source-location</a></span> is <span class="RktVal">#t</span>.</p><p>If <span class="RktVar">sub-expr</span> is provided and not <span class="RktVal">#f</span>, it is used (in
syntax form) for the <span class="RktSym">exprs</span> field of the generated exception
record, else the <span class="RktVar">expr</span> is used if provided and not
<span class="RktVal">#f</span>. In either case, the syntax object is <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cons%29%29" class="RktValLink" data-pltdoc="x">cons</a></span>ed onto
<span class="RktVar">extra-sources</span> to produce the <span class="RktSym">exprs</span> field, or
<span class="RktVar">extra-sources</span> is used directly for <span class="RktSym">exprs</span> if neither
<span class="RktVar">expr</span> nor <span class="RktVar">sub-expr</span> is provided and not <span class="RktVal">#f</span>.</p><p>The form name used in the generated error message is determined
through a combination of the <span class="RktVar">name</span>, <span class="RktVar">expr</span>, and
<span class="RktVar">sub-expr</span> arguments:</p><ul><li><p>When <span class="RktVar">name</span> is <span class="RktVal">#f</span>, and when <span class="RktVar">expr</span> is
either an identifier or a syntax pair containing an identifier as
its first element, then the form name from the error message is the
identifier’s symbol.</p></li><li><p>When <span class="RktVar">name</span> is <span class="RktVal">#f</span> and when <span class="RktVar">expr</span> is not
an identifier or a syntax pair containing an identifier as its
first element, then the form name in the error message is
<span class="RktVal">"?"</span>.</p></li><li><p>When <span class="RktVar">name</span> is a symbol, then the symbol
is used as the form name in the generated error message.</p></li></ul><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""Handling_Exceptions"">10.2.3<tt> </tt><a name="(part._.Handling_.Exceptions)"></a>Handling Exceptions</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/private/more-scheme..rkt)._call-with-exception-handler))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._call-with-exception-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">call-with-exception-handler</a></span></span><span class="hspace"> </span><span class="RktVar">f</span><span class="hspace"> </span><span class="RktVar">thunk</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">f</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">thunk</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Installs <span class="RktVar">f</span> as the <a href="eval-model.html#%28tech._exception._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">exception handler</span></a> for the
<a href="eval-model.html#%28tech._dynamic._extent%29" class="techoutside" data-pltdoc="x"><span class="techinside">dynamic extent</span></a> of the call to <span class="RktVar">thunk</span>. If an exception
is raised during the evaluation of <span class="RktVar">thunk</span> (in an extension of
the current continuation that does not have its own exception
handler), then <span class="RktVar">f</span> is applied to the <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span>d value in
the continuation of the <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span> call (but the continuation is
normally extended
with a <a href="eval-model.html#%28tech._continuation._barrier%29" class="techoutside" data-pltdoc="x"><span class="techinside">continuation barrier</span></a>; see <a href="eval-model.html#%28part._prompt-model%29" data-pltdoc="x">Prompts, Delimited Continuations, and Barriers</a> and
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span>).</div></p><p>Any procedure that takes one argument can be an exception handler.
Normally, an exception handler escapes from the context of the
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span> call via <span class="RktSym"><a href="cont.html#%28def._%28%28quote._~23~25kernel%29._abort-current-continuation%29%29" class="RktValLink" data-pltdoc="x">abort-current-continuation</a></span> or some other escape
mechanism. To propagate an exception to the “previous” exception
handler—<wbr></wbr>that is, the exception handler associated with the rest of
the continuation after the point where the called exception handler
was associated with the continuation—<wbr></wbr>an exception handler can simply
return a result instead of escaping, in which case the <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span> call
propagates the value to the previous exception handler (still in the
dynamic extent of the call to <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span>, and under the same
barrier, if any). If an exception handler returns a result and no
previous handler is available, the <a href="#%28tech._uncaught._exception._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">uncaught-exception handler</span></a>
is used.</p><p>A call to an exception handler is <span class="RktSym"><a href="breakhandler.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._parameterize-break%29%29" class="RktStxLink" data-pltdoc="x">parameterize-break</a></span>ed to
disable breaks, and it is wrapped with
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._call-with-exception-handler%29%29" class="RktValLink" data-pltdoc="x">call-with-exception-handler</a></span> to install an exception handler
that reports both the original and newly raised exceptions via the
<a href="#%28tech._error._display._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error display handler</span></a> and then escapes via the <a href="#%28tech._error._escape._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error
escape handler</span></a>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._uncaught-exception-handler))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._uncaught-exception-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">uncaught-exception-handler</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._uncaught-exception-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">uncaught-exception-handler</a></span></span><span class="hspace"> </span><span class="RktVar">f</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">f</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines an <a name="(tech._uncaught._exception._handler)"></a><span style="font-style: italic">uncaught-exception handler</span> used by
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span> when the relevant continuation has no exception handler
installed with <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._call-with-exception-handler%29%29" class="RktValLink" data-pltdoc="x">call-with-exception-handler</a></span> or
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="RktStxLink" data-pltdoc="x">with-handlers</a></span>. Unlike exception handlers installed with
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._call-with-exception-handler%29%29" class="RktValLink" data-pltdoc="x">call-with-exception-handler</a></span>, the uncaught-exception
handler must not return a value when called by <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span>; if
it returns, an exception is raised (to be handled by an exception
handler that reports both the original and newly raised exception).</div></p><p>The default uncaught-exception handler prints an error message using
the current <a href="#%28tech._error._display._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error display handler</span></a> (see <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-display-handler%29%29" class="RktValLink" data-pltdoc="x">error-display-handler</a></span>),
unless the argument to the handler is an instance of <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak~3ahang-up%29%29" class="RktValLink" data-pltdoc="x">exn:break:hang-up</a></span>.
If the argument to the handler is an instance of <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak~3ahang-up%29%29" class="RktValLink" data-pltdoc="x">exn:break:hang-up</a></span>
or <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak~3aterminate%29%29" class="RktValLink" data-pltdoc="x">exn:break:terminate</a></span>, the default uncaught-exception handler
then calls the <a href="Exiting.html#%28tech._exit._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">exit handler</span></a> with <span class="RktVal">1</span>, which normally exits
or escapes. For any argument, the default uncaught-exception handler
then escapes by calling the current <a href="#%28tech._error._escape._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error escape handler</span></a> (see
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-escape-handler%29%29" class="RktValLink" data-pltdoc="x">error-escape-handler</a></span>). The call to each handler is
<span class="RktSym"><a href="parameters.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._parameterize%29%29" class="RktStxLink" data-pltdoc="x">parameterize</a></span>d to set <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-display-handler%29%29" class="RktValLink" data-pltdoc="x">error-display-handler</a></span> to the
default <a href="#%28tech._error._display._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error display handler</span></a>, and it is <span class="RktSym"><a href="breakhandler.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._parameterize-break%29%29" class="RktStxLink" data-pltdoc="x">parameterize-break</a></span>ed
to disable breaks. The call to the <a href="#%28tech._error._escape._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error escape handler</span></a> is further
parameterized to set <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-escape-handler%29%29" class="RktValLink" data-pltdoc="x">error-escape-handler</a></span> to the default
<a href="#%28tech._error._escape._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error escape handler</span></a>; if the <a href="#%28tech._error._escape._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error escape handler</span></a> returns, then
the default <a href="#%28tech._error._escape._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error escape handler</span></a> is called.</p><p>When the current <a href="#%28tech._error._display._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error display handler</span></a> is the default handler, then the
error-display call is parameterized to install an emergency error
display handler that logs an error (see <span class="RktSym"><a href="logging.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-error%29%29" class="RktStxLink" data-pltdoc="x">log-error</a></span>) and never
fails.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><table cellspacing="0" cellpadding="0" class="RktBlk RForeground"><tr><td><span class="RktPn">(</span><a name="(form._((lib._racket/private/more-scheme..rkt)._with-handlers))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">with-handlers</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktVar">pred-expr</span><span class="hspace"> </span><span class="RktVar">handler-expr</span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Evaluates each <span class="RktVar">pred-expr</span> and <span class="RktVar">handler-expr</span> in the
order that they are specified, and then evaluates the <span class="RktVar">body</span>s
with a new exception handler during its dynamic extent.</div></p><p>The new exception handler processes an exception only if one of the
<span class="RktVar">pred-expr</span> procedures returns a true value when applied to the
exception, otherwise the exception handler is invoked from the
continuation of the <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="RktStxLink" data-pltdoc="x">with-handlers</a></span> expression (by raising the
exception again). If an exception is handled by one of the
<span class="RktVar">handler-expr</span> procedures, the result of the entire
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="RktStxLink" data-pltdoc="x">with-handlers</a></span> expression is the return value of the handler.</p><p>When an exception is raised during the evaluation of <span class="RktVar">body</span>s,
each predicate procedure <span class="RktVar">pred-expr</span> is applied to the
exception value; if a predicate returns a true value, the
corresponding <span class="RktVar">handler-expr</span> procedure is invoked with the
exception as an argument. The predicates are tried in the order that
they are specified.</p><p>Before any predicate or handler procedure is invoked, the continuation
of the entire <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="RktStxLink" data-pltdoc="x">with-handlers</a></span> expression is restored, but also
<span class="RktSym"><a href="breakhandler.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._parameterize-break%29%29" class="RktStxLink" data-pltdoc="x">parameterize-break</a></span>ed to disable breaks. Thus, breaks are
disabled by default during the predicate and handler procedures (see
<a href="breakhandler.html" data-pltdoc="x">Breaks</a>), and the exception handler is the one from
the continuation of the <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="RktStxLink" data-pltdoc="x">with-handlers</a></span> expression.</p><p>The <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3afail~3f%29%29" class="RktValLink" data-pltdoc="x">exn:fail?</a></span> procedure is useful as a handler predicate to
catch all error exceptions. Avoid using <span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktVal">#t</span><span class="RktPn">)</span> as a
predicate, because the <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak%29%29" class="RktValLink" data-pltdoc="x">exn:break</a></span> exception typically should
not be caught (unless it will be re-raised to cooperatively
break). Beware, also, of catching and discarding exceptions, because
discarding an error message can make debugging unnecessarily
difficult; instead of discarding an error message, consider logging it
via <span class="RktSym"><a href="logging.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._log-error%29%29" class="RktStxLink" data-pltdoc="x">log-error</a></span> or a logging form created by
<span class="RktSym"><a href="logging.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._define-logger%29%29" class="RktStxLink" data-pltdoc="x">define-logger</a></span>.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="RktStxLink" data-pltdoc="x">with-handlers</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3afail~3asyntax~3f%29%29" class="RktValLink" data-pltdoc="x">exn:fail:syntax?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~ce~bb%29%29" class="RktStxLink" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">e</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Writing.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._displayln%29%29" class="RktValLink" data-pltdoc="x">displayln</a></span><span class="hspace"> </span><span class="RktVal">"got a syntax error"</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-syntax-error%29%29" class="RktValLink" data-pltdoc="x">raise-syntax-error</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktVal">"a syntax error"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktOut">got a syntax error</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="RktStxLink" data-pltdoc="x">with-handlers</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3afail~3asyntax~3f%29%29" class="RktValLink" data-pltdoc="x">exn:fail:syntax?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~ce~bb%29%29" class="RktStxLink" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">e</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Writing.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._displayln%29%29" class="RktValLink" data-pltdoc="x">displayln</a></span><span class="hspace"> </span><span class="RktVal">"got a syntax error"</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3afail~3f%29%29" class="RktValLink" data-pltdoc="x">exn:fail?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~ce~bb%29%29" class="RktStxLink" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">e</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Writing.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._displayln%29%29" class="RktValLink" data-pltdoc="x">displayln</a></span><span class="hspace"> </span><span class="RktVal">"fallback clause"</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise-syntax-error%29%29" class="RktValLink" data-pltdoc="x">raise-syntax-error</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktVal">"a syntax error"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktOut">got a syntax error</span></p></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><table cellspacing="0" cellpadding="0" class="RktBlk RForeground"><tr><td><span class="RktPn">(</span><a name="(form._((lib._racket/private/more-scheme..rkt)._with-handlers*))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%2A%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">with-handlers*</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktVar">pred-expr</span><span class="hspace"> </span><span class="RktVar">handler-expr</span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="RktStxLink" data-pltdoc="x">with-handlers</a></span>, but if a <span class="RktVar">handler-expr</span> procedure
is called, breaks are not explicitly disabled, and the handler call is
in tail position with respect to the <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%2A%29%29" class="RktStxLink" data-pltdoc="x">with-handlers*</a></span> form.</div></p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""Configuring_Default_Handling"">10.2.4<tt> </tt><a name="(part._.Configuring_.Default_.Handling)"></a>Configuring Default Handling</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._error-escape-handler))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-escape-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-escape-handler</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-escape-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-escape-handler</a></span></span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter for the <a name="(tech._error._escape._handler)"></a><span style="font-style: italic">error escape handler</span>, which takes no
arguments and escapes from the dynamic context of an exception. The
default error escape handler escapes using
<span class="RktPn">(</span><span class="RktSym"><a href="cont.html#%28def._%28%28quote._~23~25kernel%29._abort-current-continuation%29%29" class="RktValLink" data-pltdoc="x">abort-current-continuation</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="cont.html#%28def._%28%28quote._~23~25kernel%29._default-continuation-prompt-tag%29%29" class="RktValLink" data-pltdoc="x">default-continuation-prompt-tag</a></span><span class="RktPn">)</span><span class="stt"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void%29%29" class="RktValLink" data-pltdoc="x">void</a></span><span class="RktPn">)</span>.</div></p><p>The error escape handler is normally called directly by an exception
handler, in a <a href="eval-model.html#%28tech._parameterization%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameterization</span></a> that sets the <a href="#%28tech._error._display._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error
display handler</span></a> and <a href="#%28tech._error._escape._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error escape handler</span></a> to the default
handlers, and it is normally <span class="RktSym"><a href="breakhandler.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._parameterize-break%29%29" class="RktStxLink" data-pltdoc="x">parameterize-break</a></span>ed to disable
breaks. To escape from a run-time error in a different context, use
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span> or <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValLink" data-pltdoc="x">error</a></span>.</p><p>Due to a <a href="eval-model.html#%28tech._continuation._barrier%29" class="techoutside" data-pltdoc="x"><span class="techinside">continuation barrier</span></a> around exception-handling calls,
an error escape handler cannot invoke a full continuation that was
created prior to the exception, but it can abort to a prompt (see
<span class="RktSym"><a href="cont.html#%28def._%28%28quote._~23~25kernel%29._call-with-continuation-prompt%29%29" class="RktValLink" data-pltdoc="x">call-with-continuation-prompt</a></span>) or invoke an escape
continuation (see <span class="RktSym"><a href="cont.html#%28def._%28%28quote._~23~25kernel%29._call-with-escape-continuation%29%29" class="RktValLink" data-pltdoc="x">call-with-escape-continuation</a></span>).</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._error-display-handler))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-display-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-display-handler</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-display-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-display-handler</a></span></span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter for the <a name="(tech._error._display._handler)"></a><span style="font-style: italic">error display handler</span>, which is called
by the default exception handler with an error message and the
exception value. More generally, the handler’s first argument is a
string to print as an error message, and the second is a value
representing a raised exception.</div></p><p>The default error display handler <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._display%29%29" class="RktValLink" data-pltdoc="x">display</a></span>s its first argument
to the current error port (determined by the
<span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._current-error-port%29%29" class="RktValLink" data-pltdoc="x">current-error-port</a></span> parameter) and extracts a stack trace (see
<span class="RktSym"><a href="contmarks.html#%28def._%28%28quote._~23~25kernel%29._continuation-mark-set-~3econtext%29%29" class="RktValLink" data-pltdoc="x">continuation-mark-set->context</a></span>) to display from the second
argument if it is an <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn%29%29" class="RktValLink" data-pltdoc="x">exn</a></span> value but not an
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3auser%29%29" class="RktValLink" data-pltdoc="x">exn:fail:user</a></span> value.</p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>The default error display handler in DrRacket also uses
the second argument to highlight source locations.</p></blockquote></blockquote></blockquote><p>To report a run-time error, use <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span> or procedures like
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValLink" data-pltdoc="x">error</a></span>, instead of calling the error display handler
directly.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._error-print-width))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-print-width%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-print-width</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._~3e~3d%2Fc%29%29" class="RktValLink" data-pltdoc="x">>=/c</a></span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-print-width%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-print-width</a></span></span><span class="hspace"> </span><span class="RktVar">width</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">width</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._~3e~3d%2Fc%29%29" class="RktValLink" data-pltdoc="x">>=/c</a></span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter whose value is used as the maximum number of characters
used to print a Racket value that is embedded in a primitive error
message.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._error-print-context-length))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-print-context-length%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-print-context-length</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-print-context-length%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-print-context-length</a></span></span><span class="hspace"> </span><span class="RktVar">cnt</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">cnt</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter whose value is used by the default <a href="#%28tech._error._display._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error display handler</span></a>
as the maximum number of lines of context (or “stack trace”) to
print; a single “...” line is printed if more lines are available
after the first <span class="RktVar">cnt</span> lines. A <span class="RktVal">0</span> value for
<span class="RktVar">cnt</span> disables context printing entirely.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._error-value-~3estring-handler))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-value-~3estring-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-value->string-handler</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-value-~3estring-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-value->string-handler</a></span></span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">proc</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines the <a name="(tech._error._value._conversion._handler)"></a><span style="font-style: italic">error value conversion
handler</span>, which is used to print a Racket value that is embedded in a
primitive error message.</div></p><p>The integer argument to the handler specifies the maximum number of
characters that should be used to represent the value in the resulting
string. The default error value conversion handler <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print%29%29" class="RktValLink" data-pltdoc="x">print</a></span>s
the value into a string (using the current <a href="Writing.html#%28tech._global._port._print._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">global port print
handler</span></a>; see <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._global-port-print-handler%29%29" class="RktValLink" data-pltdoc="x">global-port-print-handler</a></span>). If the printed form
is too long, the printed form is truncated and the last three
characters of the return string are set to “...”.</p><p>If the string returned by an error value conversion handler is longer
than requested, the string is destructively “truncated” by setting
the first extra position in the string to the null character. If a
non-string is returned, then the string <span class="RktVal">"..."</span> is used. If a
primitive error string needs to be generated before the handler has
returned, the default error value conversion handler is used.</p><p>Calls to an error value conversion handler are <span class="RktSym"><a href="parameters.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._parameterize%29%29" class="RktStxLink" data-pltdoc="x">parameterize</a></span>d
to re-install the default error value conversion handler, and to
enable printing of unreadable values (see <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print-unreadable%29%29" class="RktValLink" data-pltdoc="x">print-unreadable</a></span>).</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._error-print-source-location))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-print-source-location%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-print-source-location</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-print-source-location%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-print-source-location</a></span></span><span class="hspace"> </span><span class="RktVar">include?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">include?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls whether read and syntax error messages
include source information, such as the source line and column or the
expression. This parameter also controls the error message when a
module-defined variable is accessed before its definition is executed;
the parameter determines whether the message includes a module
name. Only the message field of an <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread%29%29" class="RktValLink" data-pltdoc="x">exn:fail:read</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax%29%29" class="RktValLink" data-pltdoc="x">exn:fail:syntax</a></span>, or <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3avariable%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract:variable</a></span>
structure is affected by the parameter. The default is <span class="RktVal">#t</span>.</div></p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""Built-in_Exception_Types"">10.2.5<tt> </tt><a name="(part._.Built-in_.Exception_.Types)"></a>Built-in Exception Types</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((quote._~23~25kernel)._exn-continuation-marks))"></a><a name="(def._((quote._~23~25kernel)._exn-message))"></a><a name="(def._((lib._racket/private/base..rkt)._make-exn))"></a><a name="(def._((quote._~23~25kernel)._exn~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn))"></a><a name="(def._((lib._racket/private/base..rkt)._exn))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">message</span><span class="stt"> </span><span class="RktSym">continuation-marks</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn%29%29" class="RktValLink" data-pltdoc="x">make-exn</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">message</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">continuation-marks</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="contmarks.html#%28def._%28%28quote._~23~25kernel%29._continuation-mark-set~3f%29%29" class="RktValLink" data-pltdoc="x">continuation-mark-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">The base <a href="structures.html#%28tech._structure._type%29" class="techoutside" data-pltdoc="x"><span class="techinside">structure type</span></a> for exceptions. The <span class="RktSym">message</span>
field contains an error message, and the <span class="RktSym"><a href="contmarks.html#%28def._%28%28quote._~23~25kernel%29._continuation-marks%29%29" class="RktValLink" data-pltdoc="x">continuation-marks</a></span>
field contains the value produced by <span class="RktPn">(</span><span class="RktSym"><a href="contmarks.html#%28def._%28%28quote._~23~25kernel%29._current-continuation-marks%29%29" class="RktValLink" data-pltdoc="x">current-continuation-marks</a></span><span class="RktPn">)</span>
immediately before the exception was raised.</div></p><p>Exceptions raised by Racket form a hierarchy under <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn%29%29" class="RktValLink" data-pltdoc="x">exn</a></span>:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn%29%29" class="RktValLink" data-pltdoc="x">exn</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="RktValLink" data-pltdoc="x">exn:fail</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3aarity%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract:arity</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3adivide-by-zero%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract:divide-by-zero</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3anon-fixnum-result%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract:non-fixnum-result</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3acontinuation%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract:continuation</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3avariable%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract:variable</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax%29%29" class="RktValLink" data-pltdoc="x">exn:fail:syntax</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax~3aunbound%29%29" class="RktValLink" data-pltdoc="x">exn:fail:syntax:unbound</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax~3amissing-module%29%29" class="RktValLink" data-pltdoc="x">exn:fail:syntax:missing-module</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread%29%29" class="RktValLink" data-pltdoc="x">exn:fail:read</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread~3aeof%29%29" class="RktValLink" data-pltdoc="x">exn:fail:read:eof</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread~3anon-char%29%29" class="RktValLink" data-pltdoc="x">exn:fail:read:non-char</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem%29%29" class="RktValLink" data-pltdoc="x">exn:fail:filesystem</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3aexists%29%29" class="RktValLink" data-pltdoc="x">exn:fail:filesystem:exists</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3aversion%29%29" class="RktValLink" data-pltdoc="x">exn:fail:filesystem:version</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3aerrno%29%29" class="RktValLink" data-pltdoc="x">exn:fail:filesystem:errno</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3amissing-module%29%29" class="RktValLink" data-pltdoc="x">exn:fail:filesystem:missing-module</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork%29%29" class="RktValLink" data-pltdoc="x">exn:fail:network</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork~3aerrno%29%29" class="RktValLink" data-pltdoc="x">exn:fail:network:errno</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aout-of-memory%29%29" class="RktValLink" data-pltdoc="x">exn:fail:out-of-memory</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aunsupported%29%29" class="RktValLink" data-pltdoc="x">exn:fail:unsupported</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3auser%29%29" class="RktValLink" data-pltdoc="x">exn:fail:user</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak%29%29" class="RktValLink" data-pltdoc="x">exn:break</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak~3ahang-up%29%29" class="RktValLink" data-pltdoc="x">exn:break:hang-up</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak~3aterminate%29%29" class="RktValLink" data-pltdoc="x">exn:break:terminate</a></span></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn%29%29" class="RktValLink" data-pltdoc="x">exn</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for exceptions that represent errors, as opposed to
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak%29%29" class="RktValLink" data-pltdoc="x">exn:break</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3acontract))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3acontract~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3acontract))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3acontract))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:contract</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="RktValLink" data-pltdoc="x">exn:fail</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:contract</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for errors from the inappropriate run-time use of a function or
syntactic form.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3acontract~3aarity))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3acontract~3aarity~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3acontract~3aarity))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3acontract~3aarity))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3aarity%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:contract:arity</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3acontract~3aarity%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:contract:arity</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised when a procedure is applied to the wrong number of arguments.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3acontract~3adivide-by-zero))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3acontract~3adivide-by-zero~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3acontract~3adivide-by-zero))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3acontract~3adivide-by-zero))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3adivide-by-zero%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:contract:divide-by-zero</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3acontract~3adivide-by-zero%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:contract:divide-by-zero</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for division by exact zero.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3acontract~3anon-fixnum-result))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3acontract~3anon-fixnum-result~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3acontract~3anon-fixnum-result))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3acontract~3anon-fixnum-result))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3anon-fixnum-result%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:contract:non-fixnum-result</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3acontract~3anon-fixnum-result%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:contract:non-fixnum-result</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised by functions like <span class="RktSym"><a href="fixnums.html#%28def._%28%28lib._racket%2Ffixnum..rkt%29._fx%2B%29%29" class="RktValLink" data-pltdoc="x">fx+</a></span> when the result would not be a fixnum.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3acontract~3acontinuation))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3acontract~3acontinuation~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3acontract~3acontinuation))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3acontract~3acontinuation))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3acontinuation%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:contract:continuation</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3acontract~3acontinuation%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:contract:continuation</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised when a continuation is applied where the jump would cross a
continuation barrier.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((quote._~23~25kernel)._exn~3afail~3acontract~3avariable-id))"></a><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3acontract~3avariable))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3acontract~3avariable~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3acontract~3avariable))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3acontract~3avariable))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract~3avariable%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:contract:variable</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">id</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3acontract~3avariable%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:contract:variable</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">id</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for a reference to a not-yet-defined <a href="eval-model.html#%28tech._top._level._variable%29" class="techoutside" data-pltdoc="x"><span class="techinside">top-level variable</span></a>
or <a href="eval-model.html#%28tech._module._level._variable%29" class="techoutside" data-pltdoc="x"><span class="techinside">module-level variable</span></a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((quote._~23~25kernel)._exn~3afail~3asyntax-exprs))"></a><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3asyntax))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3asyntax~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3asyntax))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3asyntax))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:syntax</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="RktValLink" data-pltdoc="x">exn:fail</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">exprs</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3asyntax%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:syntax</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">exprs</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="stxops.html#%28def._%28%28quote._~23~25kernel%29._syntax~3f%29%29" class="RktValLink" data-pltdoc="x">syntax?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for a syntax error that is not a <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> error. The
<span class="RktSym">exprs</span> indicate the relevant source expressions,
least-specific to most-specific.</div></p><p>This structure type implements the <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._prop~3aexn~3asrclocs%29%29" class="RktValLink" data-pltdoc="x">prop:exn:srclocs</a></span> property.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3asyntax~3aunbound))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3asyntax~3aunbound~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3asyntax~3aunbound))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3asyntax~3aunbound))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax~3aunbound%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:syntax:unbound</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax%29%29" class="RktValLink" data-pltdoc="x">exn:fail:syntax</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3asyntax~3aunbound%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:syntax:unbound</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised by <span class="RktSym"><a href="__top.html#%28form._%28%28quote._~23~25kernel%29._~23~25top%29%29" class="RktStxLink" data-pltdoc="x">#%top</a></span> or <span class="RktSym"><a href="set_.html#%28form._%28%28quote._~23~25kernel%29._set%21%29%29" class="RktStxLink" data-pltdoc="x">set!</a></span> for an
unbound identifier within a module.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((quote._~23~25kernel)._exn~3afail~3asyntax~3amissing-module-path))"></a><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3asyntax~3amissing-module))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3asyntax~3amissing-module~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3asyntax~3amissing-module))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3asyntax~3amissing-module))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax~3amissing-module%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:syntax:missing-module</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3asyntax%29%29" class="RktValLink" data-pltdoc="x">exn:fail:syntax</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">path</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3asyntax~3amissing-module%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:syntax:missing-module</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">path</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-path~3f%29%29" class="RktValLink" data-pltdoc="x">module-path?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Raised by the default <a href="Module_Names_and_Loading.html#%28tech._module._name._resolver%29" class="techoutside" data-pltdoc="x"><span class="techinside">module name resolver</span></a> or default
<a href="eval.html#%28tech._load._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">load handler</span></a> to report a module path—<wbr></wbr>a reported in the
<span class="RktSym">path</span> field—<wbr></wbr>whose implementation file cannot be
found.</div></p><p>The default <a href="Module_Names_and_Loading.html#%28tech._module._name._resolver%29" class="techoutside" data-pltdoc="x"><span class="techinside">module name resolver</span></a> raises this exception only
when it is given a syntax object as its second argument, and the
default <a href="eval.html#%28tech._load._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">load handler</span></a> raises this exception only when the value
of <span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._current-module-path-for-load%29%29" class="RktValLink" data-pltdoc="x">current-module-path-for-load</a></span> is a syntax object (in which
case both the <span class="RktSym">exprs</span> field and the <span class="RktSym">path</span> field
are determined by the syntax object.</p><p>This structure type implements the <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._prop~3aexn~3amissing-module%29%29" class="RktValLink" data-pltdoc="x">prop:exn:missing-module</a></span> property.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((quote._~23~25kernel)._exn~3afail~3aread-srclocs))"></a><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3aread))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3aread~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3aread))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3aread))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:read</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="RktValLink" data-pltdoc="x">exn:fail</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">srclocs</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3aread%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:read</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">srclocs</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._srcloc~3f%29%29" class="RktValLink" data-pltdoc="x">srcloc?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for a <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> error. The <span class="RktSym">srclocs</span> indicate the
relevant source expressions.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3aread~3aeof))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3aread~3aeof~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3aread~3aeof))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3aread~3aeof))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread~3aeof%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:read:eof</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread%29%29" class="RktValLink" data-pltdoc="x">exn:fail:read</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3aread~3aeof%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:read:eof</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for a <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> error, specifically when the error is due
to an unexpected end-of-file.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3aread~3anon-char))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3aread~3anon-char~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3aread~3anon-char))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3aread~3anon-char))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread~3anon-char%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:read:non-char</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aread%29%29" class="RktValLink" data-pltdoc="x">exn:fail:read</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3aread~3anon-char%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:read:non-char</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for a <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> error, specifically when the error is due
to an unexpected non-character (i.e., “special”) element in the
input stream.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3afilesystem))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3afilesystem~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3afilesystem))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3afilesystem))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:filesystem</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="RktValLink" data-pltdoc="x">exn:fail</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3afilesystem%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:filesystem</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for an error related to the filesystem (such as a file not
found).</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3afilesystem~3aexists))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3afilesystem~3aexists~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3afilesystem~3aexists))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3afilesystem~3aexists))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3aexists%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:filesystem:exists</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem%29%29" class="RktValLink" data-pltdoc="x">exn:fail:filesystem</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3afilesystem~3aexists%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:filesystem:exists</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for an error when attempting to create a file that exists
already.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3afilesystem~3aversion))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3afilesystem~3aversion~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3afilesystem~3aversion))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3afilesystem~3aversion))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3aversion%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:filesystem:version</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem%29%29" class="RktValLink" data-pltdoc="x">exn:fail:filesystem</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3afilesystem~3aversion%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:filesystem:version</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for a version-mismatch error when loading an extension.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((quote._~23~25kernel)._exn~3afail~3afilesystem~3aerrno-errno))"></a><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3afilesystem~3aerrno))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3afilesystem~3aerrno~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3afilesystem~3aerrno))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3afilesystem~3aerrno))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3aerrno%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:filesystem:errno</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem%29%29" class="RktValLink" data-pltdoc="x">exn:fail:filesystem</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">errno</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3afilesystem~3aerrno%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:filesystem:errno</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">errno</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._cons%2Fc%29%29" class="RktValLink" data-pltdoc="x">cons/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">posix</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">windows</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">gai</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for a filesystem error for which a system error code is
available. The symbol part of an <span class="RktSym">errno</span> field indicates the
category of the error code: <span class="RktVal">'</span><span class="RktVal">posix</span> indicates a C/Posix
<span class="stt">errno</span> value, <span class="RktVal">'</span><span class="RktVal">windows</span> indicates a Windows system error
code (under Windows, only), and <span class="RktVal">'</span><span class="RktVal">gai</span> indicates a
<span class="stt">getaddrinfo</span> error code (which shows up only in
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork~3aerrno%29%29" class="RktValLink" data-pltdoc="x">exn:fail:network:errno</a></span> exceptions for operations that resolve
hostnames, but is allowed in <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3aerrno%29%29" class="RktValLink" data-pltdoc="x">exn:fail:filesystem:errno</a></span>
instances for consistency).</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><span class="nobreak"><a name="(def._((quote._~23~25kernel)._exn~3afail~3afilesystem~3amissing-module-path))"></a><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3afilesystem~3amissing-module))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3afilesystem~3amissing-module~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3afilesystem~3amissing-module))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3afilesystem~3amissing-module))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3amissing-module%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:filesystem:missing-module</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem%29%29" class="RktValLink" data-pltdoc="x">exn:fail:filesystem</a></span></span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="nobreak"><span class="RktSym">path</span><span class="RktPn">)</span></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3afilesystem~3amissing-module%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:filesystem:missing-module</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">path</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-path~3f%29%29" class="RktValLink" data-pltdoc="x">module-path?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Raised by the default <a href="Module_Names_and_Loading.html#%28tech._module._name._resolver%29" class="techoutside" data-pltdoc="x"><span class="techinside">module name resolver</span></a> or default
<a href="eval.html#%28tech._load._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">load handler</span></a> to report a module path—<wbr></wbr>a reported in the
<span class="RktSym">path</span> field—<wbr></wbr>whose implementation file cannot be
found.</div></p><p>The default <a href="Module_Names_and_Loading.html#%28tech._module._name._resolver%29" class="techoutside" data-pltdoc="x"><span class="techinside">module name resolver</span></a> raises this exception only
when it is <span style="font-style: italic">not</span> given a syntax object as its second argument, and the
default <a href="eval.html#%28tech._load._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">load handler</span></a> raises this exception only when the value
of <span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._current-module-path-for-load%29%29" class="RktValLink" data-pltdoc="x">current-module-path-for-load</a></span> is <span style="font-style: italic">not</span> a syntax object.</p><p>This structure type implements the <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._prop~3aexn~3amissing-module%29%29" class="RktValLink" data-pltdoc="x">prop:exn:missing-module</a></span> property.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3anetwork))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3anetwork~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3anetwork))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3anetwork))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:network</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="RktValLink" data-pltdoc="x">exn:fail</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3anetwork%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:network</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for TCP and UDP errors.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((quote._~23~25kernel)._exn~3afail~3anetwork~3aerrno-errno))"></a><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3anetwork~3aerrno))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3anetwork~3aerrno~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3anetwork~3aerrno))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3anetwork~3aerrno))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork~3aerrno%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:network:errno</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork%29%29" class="RktValLink" data-pltdoc="x">exn:fail:network</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">errno</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3anetwork~3aerrno%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:network:errno</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">errno</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._cons%2Fc%29%29" class="RktValLink" data-pltdoc="x">cons/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">posix</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">windows</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">gai</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for a TCP or UDP error for which a system error code is
available, where the <span class="RktSym">errno</span> field is as for
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem~3aerrno%29%29" class="RktValLink" data-pltdoc="x">exn:fail:filesystem:errno</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3aout-of-memory))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3aout-of-memory~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3aout-of-memory))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3aout-of-memory))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aout-of-memory%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:out-of-memory</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="RktValLink" data-pltdoc="x">exn:fail</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3aout-of-memory%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:out-of-memory</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for an error due to insufficient memory, in cases where sufficient
memory is at least available for raising the exception.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3aunsupported))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3aunsupported~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3aunsupported))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3aunsupported))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3aunsupported%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:unsupported</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="RktValLink" data-pltdoc="x">exn:fail</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3aunsupported%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:unsupported</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for an error due to an unsupported feature on the current
platform or configuration.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3afail~3auser))"></a><a name="(def._((quote._~23~25kernel)._exn~3afail~3auser~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3afail~3auser))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3afail~3auser))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3auser%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:user</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="RktValLink" data-pltdoc="x">exn:fail</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3auser%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:user</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised for errors that are intended to be seen by end users. In
particular, the default error printer does not show the program
context when printing the error message.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((quote._~23~25kernel)._exn~3abreak-continuation))"></a><a name="(def._((lib._racket/private/base..rkt)._make-exn~3abreak))"></a><a name="(def._((quote._~23~25kernel)._exn~3abreak~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3abreak))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3abreak))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:break</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn%29%29" class="RktValLink" data-pltdoc="x">exn</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">continuation</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3abreak%29%29" class="RktValLink" data-pltdoc="x">make-exn:break</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">continuation</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="cont.html#%28def._%28%28quote._~23~25kernel%29._continuation~3f%29%29" class="RktValLink" data-pltdoc="x">continuation?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Raised asynchronously (when enabled) in response to a break request.
The <span class="RktSym">continuation</span> field can be used to resume the interrupted
computation in the <a href="#%28tech._uncaught._exception._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">uncaught-exception handler</span></a> or
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._call-with-exception-handler%29%29" class="RktValLink" data-pltdoc="x">call-with-exception-handler</a></span> (but <span style="font-style: italic">not</span>
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._with-handlers%29%29" class="RktStxLink" data-pltdoc="x">with-handlers</a></span> because it escapes from the exception context
before evaluating any predicates or handlers).</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3abreak~3ahang-up))"></a><a name="(def._((quote._~23~25kernel)._exn~3abreak~3ahang-up~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3abreak~3ahang-up))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3abreak~3ahang-up))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak~3ahang-up%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:break:hang-up</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak%29%29" class="RktValLink" data-pltdoc="x">exn:break</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3abreak~3ahang-up%29%29" class="RktValLink" data-pltdoc="x">make-exn:break:hang-up</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised asynchronously for hang-up breaks. The default
<a href="#%28tech._uncaught._exception._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">uncaught-exception handler</span></a> reacts to this exception type by
calling the <a href="Exiting.html#%28tech._exit._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">exit handler</span></a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._racket/private/base..rkt)._make-exn~3abreak~3aterminate))"></a><a name="(def._((quote._~23~25kernel)._exn~3abreak~3aterminate~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3aexn~3abreak~3aterminate))"></a><a name="(def._((lib._racket/private/base..rkt)._exn~3abreak~3aterminate))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak~3aterminate%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:break:terminate</a></span></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak%29%29" class="RktValLink" data-pltdoc="x">exn:break</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3abreak~3aterminate%29%29" class="RktValLink" data-pltdoc="x">make-exn:break:terminate</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Raised asynchronously for termination-request breaks. The default
<a href="#%28tech._uncaught._exception._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">uncaught-exception handler</span></a> reacts to this exception type by
calling the <a href="Exiting.html#%28tech._exit._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">exit handler</span></a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((quote._~23~25kernel)._prop~3aexn~3asrclocs))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._prop~3aexn~3asrclocs%29%29" class="RktValDef RktValLink" data-pltdoc="x">prop:exn:srclocs</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="structprops.html#%28def._%28%28quote._~23~25kernel%29._struct-type-property~3f%29%29" class="RktValLink" data-pltdoc="x">struct-type-property?</a></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">A property that identifies structure types that provide a list of
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29" class="RktValLink" data-pltdoc="x">srcloc</a></span> values. The property is normally attached to structure
types used to represent exception information.</div></p><p>The property value must be a procedure that accepts a single
value—<wbr></wbr>the structure type instance from which to extract source
locations—<wbr></wbr>and returns a list of <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29" class="RktValLink" data-pltdoc="x">srcloc</a></span>s. Some <a href="#%28tech._error._display._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">error
display handlers</span></a> use only the first returned location.</p><p><div class="SIntrapara">As an example,
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"> </span></td></tr><tr><td><span class="RktMeta"></span><span class="RktCmt">;;</span><span class="hspace"> </span><span class="RktCmt">We</span><span class="hspace"> </span><span class="RktCmt">create</span><span class="hspace"> </span><span class="RktCmt">a</span><span class="hspace"> </span><span class="RktCmt">structure</span><span class="hspace"> </span><span class="RktCmt">that</span><span class="hspace"> </span><span class="RktCmt">supports</span><span class="hspace"> </span><span class="RktCmt">the</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktCmt">;;</span><span class="hspace"> </span><span class="RktCmt">prop:exn:srcloc</span><span class="hspace"> </span><span class="RktCmt">protocol.</span><span class="hspace"> </span><span class="RktCmt">It</span><span class="hspace"> </span><span class="RktCmt">carries</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktCmt">;;</span><span class="hspace"> </span><span class="RktCmt">with</span><span class="hspace"> </span><span class="RktCmt">it</span><span class="hspace"> </span><span class="RktCmt">the</span><span class="hspace"> </span><span class="RktCmt">location</span><span class="hspace"> </span><span class="RktCmt">of</span><span class="hspace"> </span><span class="RktCmt">the</span><span class="hspace"> </span><span class="RktCmt">syntax</span><span class="hspace"> </span><span class="RktCmt">that</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktCmt">;;</span><span class="hspace"> </span><span class="RktCmt">is</span><span class="hspace"> </span><span class="RktCmt">guilty.</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define-struct%29%29" class="RktStxLink" data-pltdoc="x">define-struct</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">exn:fail:he-who-shall-not-be-named</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail%29%29" class="RktValLink" data-pltdoc="x">exn:fail</a></span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">a-srcloc</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">#:property</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._prop~3aexn~3asrclocs%29%29" class="RktValLink" data-pltdoc="x">prop:exn:srclocs</a></span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">a-struct</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="match.html#%28form._%28%28lib._racket%2Fmatch..rkt%29._match%29%29" class="RktStxLink" data-pltdoc="x">match</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">a-struct</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">exn:fail:he-who-shall-not-be-named</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">msg</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">marks</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">a-srcloc</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">a-srcloc</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"> </span></td></tr><tr><td><span class="RktMeta"></span><span class="RktCmt">;;</span><span class="hspace"> </span><span class="RktCmt">We</span><span class="hspace"> </span><span class="RktCmt">can</span><span class="hspace"> </span><span class="RktCmt">play</span><span class="hspace"> </span><span class="RktCmt">with</span><span class="hspace"> </span><span class="RktCmt">this</span><span class="hspace"> </span><span class="RktCmt">by</span><span class="hspace"> </span><span class="RktCmt">creating</span><span class="hspace"> </span><span class="RktCmt">a</span><span class="hspace"> </span><span class="RktCmt">form</span><span class="hspace"> </span><span class="RktCmt">that</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktCmt">;;</span><span class="hspace"> </span><span class="RktCmt">looks</span><span class="hspace"> </span><span class="RktCmt">at</span><span class="hspace"> </span><span class="RktCmt">identifiers,</span><span class="hspace"> </span><span class="RktCmt">and</span><span class="hspace"> </span><span class="RktCmt">only</span><span class="hspace"> </span><span class="RktCmt">flags</span><span class="hspace"> </span><span class="RktCmt">specific</span><span class="hspace"> </span><span class="RktCmt">ones.</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define-syntax%29%29" class="RktStxLink" data-pltdoc="x">define-syntax</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">skeeterize</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">stx</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._syntax-case%29%29" class="RktStxLink" data-pltdoc="x">syntax-case</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">stx</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29.__%29%29" class="RktStxLink" data-pltdoc="x">_</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">expr</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="if.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._cond%29%29" class="RktStxLink" data-pltdoc="x">cond</a></span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="if.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._and%29%29" class="RktStxLink" data-pltdoc="x">and</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="stxops.html#%28def._%28%28lib._racket%2Fprivate%2Fstx..rkt%29._identifier~3f%29%29" class="RktValLink" data-pltdoc="x">identifier?</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._syntax%29%29" class="RktStxLink" data-pltdoc="x">#'</a></span><span class="RktSym">expr</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="stxops.html#%28def._%28%28quote._~23~25kernel%29._syntax-e%29%29" class="RktValLink" data-pltdoc="x">syntax-e</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._syntax%29%29" class="RktStxLink" data-pltdoc="x">#'</a></span><span class="RktSym">expr</span><span class="RktPn">)</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="quote.html#%28form._%28%28quote._~23~25kernel%29._quote%29%29" class="RktStxLink" data-pltdoc="x">'</a></span><span class="RktSym">voldemort</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fqqstx..rkt%29._quasisyntax%2Floc%29%29" class="RktStxLink" data-pltdoc="x">quasisyntax/loc</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">stx</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">make-exn:fail:he-who-shall-not-be-named</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktVal">"oh</span><span class="hspace"> </span><span class="RktVal">dear</span><span class="hspace"> </span><span class="RktVal">don't</span><span class="hspace"> </span><span class="RktVal">say</span><span class="hspace"> </span><span class="RktVal">his</span><span class="hspace"> </span><span class="RktVal">name"</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="contmarks.html#%28def._%28%28quote._~23~25kernel%29._current-continuation-marks%29%29" class="RktValLink" data-pltdoc="x">current-continuation-marks</a></span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29" class="RktValLink" data-pltdoc="x">srcloc</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="quote.html#%28form._%28%28quote._~23~25kernel%29._quote%29%29" class="RktStxLink" data-pltdoc="x">'</a></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fqqstx..rkt%29._unsyntax%29%29" class="RktStxLink" data-pltdoc="x">#,</a></span><span class="RktPn">(</span><span class="RktSym"><a href="stxops.html#%28def._%28%28quote._~23~25kernel%29._syntax-source%29%29" class="RktValLink" data-pltdoc="x">syntax-source</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._syntax%29%29" class="RktStxLink" data-pltdoc="x">#'</a></span><span class="RktSym">expr</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="quote.html#%28form._%28%28quote._~23~25kernel%29._quote%29%29" class="RktStxLink" data-pltdoc="x">'</a></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fqqstx..rkt%29._unsyntax%29%29" class="RktStxLink" data-pltdoc="x">#,</a></span><span class="RktPn">(</span><span class="RktSym"><a href="stxops.html#%28def._%28%28quote._~23~25kernel%29._syntax-line%29%29" class="RktValLink" data-pltdoc="x">syntax-line</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._syntax%29%29" class="RktStxLink" data-pltdoc="x">#'</a></span><span class="RktSym">expr</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="quote.html#%28form._%28%28quote._~23~25kernel%29._quote%29%29" class="RktStxLink" data-pltdoc="x">'</a></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fqqstx..rkt%29._unsyntax%29%29" class="RktStxLink" data-pltdoc="x">#,</a></span><span class="RktPn">(</span><span class="RktSym"><a href="stxops.html#%28def._%28%28quote._~23~25kernel%29._syntax-column%29%29" class="RktValLink" data-pltdoc="x">syntax-column</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._syntax%29%29" class="RktStxLink" data-pltdoc="x">#'</a></span><span class="RktSym">expr</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="quote.html#%28form._%28%28quote._~23~25kernel%29._quote%29%29" class="RktStxLink" data-pltdoc="x">'</a></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fqqstx..rkt%29._unsyntax%29%29" class="RktStxLink" data-pltdoc="x">#,</a></span><span class="RktPn">(</span><span class="RktSym"><a href="stxops.html#%28def._%28%28quote._~23~25kernel%29._syntax-position%29%29" class="RktValLink" data-pltdoc="x">syntax-position</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._syntax%29%29" class="RktStxLink" data-pltdoc="x">#'</a></span><span class="RktSym">expr</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="quote.html#%28form._%28%28quote._~23~25kernel%29._quote%29%29" class="RktStxLink" data-pltdoc="x">'</a></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fqqstx..rkt%29._unsyntax%29%29" class="RktStxLink" data-pltdoc="x">#,</a></span><span class="RktPn">(</span><span class="RktSym"><a href="stxops.html#%28def._%28%28quote._~23~25kernel%29._syntax-span%29%29" class="RktValLink" data-pltdoc="x">syntax-span</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._syntax%29%29" class="RktStxLink" data-pltdoc="x">#'</a></span><span class="RktSym">expr</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">[</span><span class="RktSym"><a href="if.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._else%29%29" class="RktStxLink" data-pltdoc="x">else</a></span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktCmt">;;</span><span class="hspace"> </span><span class="RktCmt">Otherwise,</span><span class="hspace"> </span><span class="RktCmt">leave</span><span class="hspace"> </span><span class="RktCmt">the</span><span class="hspace"> </span><span class="RktCmt">expression</span><span class="hspace"> </span><span class="RktCmt">alone.</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._syntax%29%29" class="RktStxLink" data-pltdoc="x">#'</a></span><span class="RktSym">expr</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"> </span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">f</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._%2A%29%29" class="RktValLink" data-pltdoc="x">*</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">skeeterize</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"> </span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">g</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">voldemort</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._%2A%29%29" class="RktValLink" data-pltdoc="x">*</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">skeeterize</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">voldemort</span><span class="RktPn">)</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">voldemort</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"> </span></td></tr><tr><td><span class="RktMeta"></span><span class="RktCmt">;;</span><span class="hspace"> </span><span class="RktCmt">Examples:</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">f</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktVal">7</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">g</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktVal">7</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktCmt">;;</span><span class="hspace"> </span><span class="RktCmt">The</span><span class="hspace"> </span><span class="RktCmt">error</span><span class="hspace"> </span><span class="RktCmt">should</span><span class="hspace"> </span><span class="RktCmt">highlight</span><span class="hspace"> </span><span class="RktCmt">the</span><span class="hspace"> </span><span class="RktCmt">use</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktCmt">;;</span><span class="hspace"> </span><span class="RktCmt">of</span><span class="hspace"> </span><span class="RktCmt">the</span><span class="hspace"> </span><span class="RktCmt">one-who-shall-not-be-named</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktCmt">;;</span><span class="hspace"> </span><span class="RktCmt">in</span><span class="hspace"> </span><span class="RktCmt">g.</span><span class="RktMeta"></span></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._exn~3asrclocs~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3asrclocs~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:srclocs?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> has the <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._prop~3aexn~3asrclocs%29%29" class="RktValLink" data-pltdoc="x">prop:exn:srclocs</a></span>
property, <span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._exn~3asrclocs-accessor))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3asrclocs-accessor%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:srclocs-accessor</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3asrclocs~3f%29%29" class="RktValLink" data-pltdoc="x">exn:srclocs?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29" class="RktValLink" data-pltdoc="x">srcloc</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3asrclocs~3f%29%29" class="RktValLink" data-pltdoc="x">exn:srclocs?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29" class="RktValLink" data-pltdoc="x">srcloc</a></span>-getting procedure associated with <span class="RktVar">v</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((quote._~23~25kernel)._srcloc-span))"></a><a name="(def._((quote._~23~25kernel)._srcloc-position))"></a><a name="(def._((quote._~23~25kernel)._srcloc-column))"></a><a name="(def._((quote._~23~25kernel)._srcloc-line))"></a><a name="(def._((quote._~23~25kernel)._srcloc-source))"></a><a name="(def._((lib._racket/private/base..rkt)._make-srcloc))"></a><a name="(def._((quote._~23~25kernel)._srcloc~3f))"></a><a name="(def._((quote._~23~25kernel)._struct~3asrcloc))"></a><a name="(def._((lib._racket/private/base..rkt)._srcloc))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29" class="RktValDef RktValLink" data-pltdoc="x">srcloc</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">source</span><span class="stt"> </span><span class="RktSym">line</span><span class="stt"> </span><span class="RktSym">column</span><span class="stt"> </span><span class="RktSym">position</span><span class="stt"> </span><span class="RktSym">span</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-srcloc%29%29" class="RktValLink" data-pltdoc="x">make-srcloc</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">source</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">line</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-positive-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-positive-integer?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">column</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">position</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-positive-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-positive-integer?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">span</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">The fields of a <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29" class="RktValLink" data-pltdoc="x">srcloc</a></span> instance are as follows:</div></p><ul><li><p><span class="RktSym">source</span> —<wbr></wbr> An arbitrary value identifying the source,
often a path (see <a href="pathutils.html" data-pltdoc="x">Paths</a>).</p></li><li><p><span class="RktSym">line</span> —<wbr></wbr> The line number (counts from 1) or
<span class="RktVal">#f</span> (unknown).</p></li><li><p><span class="RktSym">column</span> —<wbr></wbr> The column number (counts from 0) or
<span class="RktVal">#f</span> (unknown).</p></li><li><p><span class="RktSym">position</span> —<wbr></wbr> The starting position (counts from 1) or
<span class="RktVal">#f</span> (unknown).</p></li><li><p><span class="RktSym">span</span> —<wbr></wbr> The number of covered positions (counts from
0) or <span class="RktVal">#f</span> (unknown).</p></li></ul><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._srcloc-~3estring))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._srcloc-~3estring%29%29" class="RktValDef RktValLink" data-pltdoc="x">srcloc->string</a></span></span><span class="hspace"> </span><span class="RktVar">srcloc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">srcloc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._srcloc~3f%29%29" class="RktValLink" data-pltdoc="x">srcloc?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Formats <span class="RktVar">srcloc</span> as a string suitable for error reporting. A
path source in <span class="RktVar">srcloc</span> is shown relative to the value of
<span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._current-directory-for-user%29%29" class="RktValLink" data-pltdoc="x">current-directory-for-user</a></span>. The result is <span class="RktVal">#f</span> if
<span class="RktVar">srcloc</span> does not contain enough information to format a
string.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((quote._~23~25kernel)._prop~3aexn~3amissing-module))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._prop~3aexn~3amissing-module%29%29" class="RktValDef RktValLink" data-pltdoc="x">prop:exn:missing-module</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="structprops.html#%28def._%28%28quote._~23~25kernel%29._struct-type-property~3f%29%29" class="RktValLink" data-pltdoc="x">struct-type-property?</a></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">A property that identifies structure types that provide a module path
for a load that fails because a module is not found.</div></p><p>The property value must be a procedure that accepts a single
value—<wbr></wbr>the structure type instance from which to extract source
locations—<wbr></wbr>and returns a <a href="Module_Names_and_Loading.html#%28tech._module._path%29" class="techoutside" data-pltdoc="x"><span class="techinside">module path</span></a>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._exn~3amissing-module~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3amissing-module~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:missing-module?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> has the <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._prop~3aexn~3amissing-module%29%29" class="RktValLink" data-pltdoc="x">prop:exn:missing-module</a></span>
property, <span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._exn~3amissing-module-accessor))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3amissing-module-accessor%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:missing-module-accessor</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3amissing-module~3f%29%29" class="RktValLink" data-pltdoc="x">exn:missing-module?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-path~3f%29%29" class="RktValLink" data-pltdoc="x">module-path?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3asrclocs~3f%29%29" class="RktValLink" data-pltdoc="x">exn:srclocs?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the <a href="Module_Names_and_Loading.html#%28tech._module._path%29" class="techoutside" data-pltdoc="x"><span class="techinside">module path</span></a>-getting procedure associated with <span class="RktVar">v</span>.</div></p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""Additional_Exception_Functions"">10.2.6<tt> </tt><a name="(part._.Additional_.Exception_.Functions)"></a><a name="(mod-path._racket/exn)"></a>Additional Exception Functions</h5><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._racket%2Fexn%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/exn</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The bindings documented in this section are provided by the <a href="#%28mod-path._racket%2Fexn%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/exn</span></a> library, not <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> or <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a>.</div></p><p class="SHistory">Added in version 6.3 of package <span class="stt">base</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/exn..rkt)._exn-~3estring))"></a><span title="Provided from: racket/exn | Package: base"><span class="RktSym"><span class="RktSymDef RktSym">exn->string</span></span></span><span class="hspace"> </span><span class="RktVar">exn</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">exn</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3f%29%29" class="RktValLink" data-pltdoc="x">exn?</a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Formats <span class="RktVar">exn</span> as a string. If <span class="RktVar">exn</span> is an <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._exn~3f%29%29" class="RktValLink" data-pltdoc="x">exn?</a></span>,
collects and returns the output from the current
<span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._error-display-handler%29%29" class="RktValLink" data-pltdoc="x">error-display-handler</a></span><span class="RktPn">)</span>; otherwise, simply converts
<span class="RktVar">exn</span> to a string using <span class="RktPn">(</span><span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._format%29%29" class="RktValLink" data-pltdoc="x">format</a></span><span class="stt"> </span><span class="RktVal">"~s\n"</span><span class="stt"> </span><span class="RktVar">exn</span><span class="RktPn">)</span>.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="values.html" title="backward to "10.1 Multiple Values"" data-pltdoc="x">← prev</a> <a href="control.html" title="up to "10 Control Flow"" data-pltdoc="x">up</a> <a href="Delayed_Evaluation.html" title="forward to "10.3 Delayed Evaluation"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|