Changeset 34101 in project


Ignore:
Timestamp:
05/29/17 05:09:14 (3 months ago)
Author:
kon
Message:

rel 1.2.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/condition-utils

    r33613 r34101  
    2323{{CHN}} is the result of {{(get-call-chain)}}, or {{#f}}.
    2424
    25 {{COND}} is a:
    26 
    27 ; {{property-condition}} : literal
     25{{COND}} is a {{property-condition}}.
     26
     27{{COND-EXPR}} is a:
     28
     29; {{COND}} : a condition object
    2830; {{symbol}} : {{(make-property-condition <symbol>)}}
    2931; {{list}} : {{(apply make-property-condition <list>)}}
     
    3234
    3335{{PROP}} is a {{symbol}}.
     36
     37=== Usage
     38
     39<enscript language=scheme>
     40(require-extension condition-utils)
     41</enscript>
    3442
    3543=== make-exn-condition
     
    5159=== make-exn-condition+
    5260
    53 <procedure>(make-exn-condition+ LOC MSG ARGS [CHN] [COND...]) => property-condition</procedure>
    54 
    55 Returns a {{composite-condition}} {{exn COND...}}.
     61<procedure>(make-exn-condition+ LOC MSG ARGS [CHN] [COND-EXPR...]) => property-condition</procedure>
     62
     63Returns a {{composite-condition}} {{exn COND-EXPR...}}.
    5664
    5765When one-of {{LOC}}, {{MSG}}, or {{ARGS}} is without a useful value in the
     
    6371=== make-condition+
    6472
    65 <procedure>(make-condition+ COND...) => property-condition</procedure>
    66 
    67 Returns a {{composite-condition}} {{COND...}}.
     73<procedure>(make-condition+ COND-EXPR...) => property-condition</procedure>
     74
     75Returns a {{composite-condition}} {{COND-EXPR...}}.
    6876
    6977=== make-condition-predicate
     
    8997=== write-exn-condition
    9098
    91 <procedure>(write-exn-condition COND)</procedure>
    92 
    93 Produces on {{(current-output-port)}} the form:
     99<procedure>(write-exn-condition COND [PORT (current-output-port)])</procedure>
     100
     101Produces on {{PORT}} the form:
    94102 Error: (<location - if any>) <message - if any>: <arguments - if any>
    95103 Call history:
     
    113121
    114122
    115 == Usage
     123=== Standard Condition Library
     124
     125==== Usage
    116126
    117127<enscript language=scheme>
    118 (require-extension condition-utils)
     128(require-extension standard-conditions)
    119129</enscript>
     130
     131==== Condition Predicates
     132
     133===== exn-condition?
     134
     135<procedure>(exn-condition? COND) => boolean</procedure>
     136
     137===== arity-condition?
     138
     139<procedure>(arity-condition? COND) => boolean</procedure>
     140
     141===== type-condition?
     142
     143<procedure>(type-condition? COND) => boolean</procedure>
     144
     145===== arithmetic-condition?
     146
     147<procedure>(arithmetic-condition? COND) => boolean</procedure>
     148
     149===== i/o-condition?
     150
     151<procedure>(i/o-condition? COND) => boolean</procedure>
     152
     153===== file-condition?
     154
     155<procedure>(file-condition? COND) => boolean</procedure>
     156
     157===== network-condition?
     158
     159<procedure>(network-condition? COND) => boolean</procedure>
     160
     161===== network-timeout-condition?
     162
     163<procedure>(network-timeout-condition? COND) => boolean</procedure>
     164
     165===== bounds-condition?
     166
     167<procedure>(bounds-condition? COND) => boolean</procedure>
     168
     169===== runtime-condition?
     170
     171<procedure>(runtime-condition? COND) => boolean</procedure>
     172
     173===== runtime-limit-condition?
     174
     175<procedure>(runtime-limit-condition? COND) => boolean</procedure>
     176
     177===== runtime-cycle-condition?
     178
     179<procedure>(runtime-cycle-condition? COND) => boolean</procedure>
     180
     181===== match-condition?
     182
     183<procedure>(match-condition? COND) => boolean</procedure>
     184
     185===== syntax-condition?
     186
     187<procedure>(syntax-condition? COND) => boolean</procedure>
     188
     189===== process-condition?
     190
     191<procedure>(process-condition? COND) => boolean</procedure>
     192
     193===== access-condition?
     194
     195<procedure>(access-condition? COND) => boolean</procedure>
     196
     197===== domain-condition?
     198
     199<procedure>(domain-condition? COND) => boolean</procedure>
     200
     201===== memory-condition?
     202
     203<procedure>(memory-condition? COND) => boolean</procedure>
     204
     205==== Condition Property Accessors
     206
     207===== exn-location
     208
     209<procedure>(exn-location COND) => *</procedure>
     210
     211===== exn-message
     212
     213<procedure>(exn-message COND) => *</procedure>
     214
     215===== exn-arguments
     216
     217<procedure>(exn-arguments COND) => *</procedure>
     218
     219===== exn-call-chain
     220
     221<procedure>(exn-call-chain COND) => *</procedure>
     222
     223
     224=== HTTP Client Condition Library
     225
     226==== Usage
     227
     228<enscript language=scheme>
     229(require-extension http-client-conditions)
     230</enscript>
     231
     232==== Condition Predicates
     233
     234===== http-condition?
     235
     236<procedure>(http-condition? COND) => boolean</procedure>
     237
     238===== client-error-condition?
     239
     240<procedure>(client-error-condition? COND) => boolean</procedure>
     241
     242===== server-error-condition?
     243
     244<procedure>(server-error-condition? COND) => boolean</procedure>
     245
     246===== unexpected-server-response-condition?
     247
     248<procedure>(unexpected-server-response-condition? COND) => boolean</procedure>
     249
     250===== redirect-depth-exceeded-condition?
     251
     252<procedure>(redirect-depth-exceeded-condition? COND) => boolean</procedure>
     253
     254===== unsupported-uri-scheme-condition?
     255
     256<procedure>(unsupported-uri-scheme-condition? COND) => boolean</procedure>
     257
     258===== unknown-authtype-condition?
     259
     260<procedure>(unknown-authtype-condition? COND) => boolean</procedure>
     261
     262==== Condition Property Accessors
     263
     264===== client-error-response
     265
     266<procedure>(client-error-response COND) => *</procedure>
     267
     268===== client-error-body
     269
     270<procedure>(client-error-body COND) => *</procedure>
     271
     272===== server-error-response
     273
     274<procedure>(server-error-response COND) => *</procedure>
     275
     276===== server-error-body
     277
     278<procedure>(server-error-body COND) => *</procedure>
     279
     280===== unexpected-server-response-response
     281
     282<procedure>(unexpected-server-response-response COND) => *</procedure>
     283
     284===== unexpected-server-response-body
     285
     286<procedure>(unexpected-server-response-body COND) => *</procedure>
     287
     288===== redirect-depth-exceeded-uri
     289
     290<procedure>(redirect-depth-exceeded-uri COND) => *</procedure>
     291
     292===== formdata-error-condition?
     293
     294<procedure>(formdata-error-condition? COND) => boolean</procedure>
     295
     296===== unsupported-uri-scheme-uri-scheme
     297
     298<procedure>(unsupported-uri-scheme-uri-scheme COND) => *</procedure>
     299
     300===== unsupported-uri-scheme-request-uri
     301
     302<procedure>(unsupported-uri-scheme-request-uri COND) => *</procedure>
     303
     304===== unknown-authtype-authtype
     305
     306<procedure>(unknown-authtype-authtype COND) => *</procedure>
     307
     308
     309=== Intarweb Condition Library
     310
     311==== Usage
     312
     313<enscript language=scheme>
     314(require-extension intarweb-conditions)
     315</enscript>
     316
     317==== Condition Predicates
     318
     319===== http-condition?
     320
     321<procedure>(http-condition? COND) => boolean</procedure>
     322
     323===== urlencoded-request-data-limit-exceeded?
     324
     325<procedure>(urlencoded-request-data-limit-exceeded? COND) => boolean</procedure>
     326
     327===== line-limit-exceeded?
     328
     329<procedure>(line-limit-exceeded? COND) => boolean</procedure>
     330
     331===== header-error?
     332
     333<procedure>(header-error? COND) => boolean</procedure>
     334
     335===== header-limit-exceeded?
     336
     337<procedure>(header-limit-exceeded? COND) => boolean</procedure>
     338
     339===== unknown-protocol-line?
     340
     341<procedure>(unknown-protocol-line? COND) => boolean</procedure>
     342
     343===== unknown-protocol?
     344
     345<procedure>(unknown-protocol? COND) => boolean</procedure>
     346
     347===== unknown-code?
     348
     349<procedure>(unknown-code? COND) => boolean</procedure>
     350
     351===== unknown-status?
     352
     353<procedure>(unknown-status? COND) => boolean</procedure>
     354
     355===== rfc1123-subparser?
     356
     357<procedure>(rfc1123-subparser? COND) => boolean</procedure>
     358
     359===== rfc850-subparser?
     360
     361<procedure>(rfc850-subparser? COND) => boolean</procedure>
     362
     363===== asctime-subparser?
     364
     365<procedure>(asctime-subparser? COND) => boolean</procedure>
     366
     367===== http-date-subparser?
     368
     369<procedure>(http-date-subparser? COND) => boolean</procedure>
     370
     371===== unencoded-header?
     372
     373<procedure>(unencoded-header? COND) => boolean</procedure>
     374
     375===== username-with-colon?
     376
     377<procedure>(username-with-colon? COND) => boolean</procedure>
     378
     379==== Condition Property Accessors
     380
     381===== urlencoded-request-data-limit-exceeded-contents
     382
     383<procedure>(urlencoded-request-data-limit-exceeded-contents COND) => *</procedure>
     384
     385===== urlencoded-request-data-limit-exceeded-limit
     386
     387<procedure>(urlencoded-request-data-limit-exceeded-limit COND) => *</procedure>
     388
     389===== line-limit-exceeded-contents
     390
     391<procedure>(line-limit-exceeded-contents COND) => *</procedure>
     392
     393===== line-limit-exceeded-limit
     394
     395<procedure>(line-limit-exceeded-limit COND) => *</procedure>
     396
     397===== header-error-contents
     398
     399<procedure>(header-error-contents COND) => *</procedure>
     400
     401===== header-limit-exceeded-contents
     402
     403<procedure>(header-limit-exceeded-contents COND) => *</procedure>
     404
     405===== header-limit-exceeded-limit
     406
     407<procedure>(header-limit-exceeded-limit COND) => *</procedure>
     408
     409===== unknown-protocol-line-line
     410
     411<procedure>(unknown-protocol-line-line COND) => *</procedure>
     412
     413===== unknown-protocol-major
     414
     415<procedure>(unknown-protocol-major COND) => *</procedure>
     416
     417===== unknown-protocol-minor
     418
     419<procedure>(unknown-protocol-minor COND) => *</procedure>
     420
     421===== unknown-code-code
     422
     423<procedure>(unknown-code-code COND) => *</procedure>
     424
     425===== unknown-status-status
     426
     427<procedure>(unknown-status-status COND) => *</procedure>
     428
     429===== rfc1123-subparser-value?
     430
     431<procedure>(rfc1123-subparser-value? COND) => boolean</procedure>
     432
     433===== rfc850-subparser-value?
     434
     435<procedure>(rfc850-subparser-value? COND) => boolean</procedure>
     436
     437===== asctime-subparser-value?
     438
     439<procedure>(asctime-subparser-value? COND) => boolean</procedure>
     440
     441===== http-date-subparser-value?
     442
     443<procedure>(http-date-subparser-value? COND) => boolean</procedure>
     444
     445===== unencoded-header-value?
     446
     447<procedure>(unencoded-header-value? COND) => boolean</procedure>
     448
     449===== username-with-colon-value?
     450
     451<procedure>(username-with-colon-value? COND) => boolean</procedure>
    120452
    121453
     
    140472== Version history
    141473
     474; 1.2.0 : amended {{write-exn-condition}}, add doc for condition libraries.
    142475; 1.1.1 : added {{write-exn-condition}}
    143476; 1.1.0 : added {{make-exn-condition}}
     
    151484== License
    152485
    153 Copyright (C) 2009-2015 Kon Lovett.  All rights reserved.
     486Copyright (C) 2009-2017 Kon Lovett.  All rights reserved.
    154487
    155488Permission is hereby granted, free of charge, to any person obtaining a
Note: See TracChangeset for help on using the changeset viewer.