How to use Error class

Best Nimble code snippet using Error

mb_chr_ord.phpt

Source:mb_chr_ord.phpt Github

copy

Full Screen

1--TEST--2mb_chr() and mb_ord()3--SKIPIF--4<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>5--FILE--6<?php7ini_set('internal_encoding', 'utf-8');8for($ch = 1; $ch < 80000; $ch++) {9 $str = mb_chr($ch);10 if (false === $str) {11 echo "ERROR($ch)\n";12 continue;13 }14 if ($ch != mb_ord($str)) {15 echo "REAL ERROR($ch)\n";16 }17}18echo 'OK';19?>20--EXPECT--21ERROR(55296)22ERROR(55297)23ERROR(55298)24ERROR(55299)25ERROR(55300)26ERROR(55301)27ERROR(55302)28ERROR(55303)29ERROR(55304)30ERROR(55305)31ERROR(55306)32ERROR(55307)33ERROR(55308)34ERROR(55309)35ERROR(55310)36ERROR(55311)37ERROR(55312)38ERROR(55313)39ERROR(55314)40ERROR(55315)41ERROR(55316)42ERROR(55317)43ERROR(55318)44ERROR(55319)45ERROR(55320)46ERROR(55321)47ERROR(55322)48ERROR(55323)49ERROR(55324)50ERROR(55325)51ERROR(55326)52ERROR(55327)53ERROR(55328)54ERROR(55329)55ERROR(55330)56ERROR(55331)57ERROR(55332)58ERROR(55333)59ERROR(55334)60ERROR(55335)61ERROR(55336)62ERROR(55337)63ERROR(55338)64ERROR(55339)65ERROR(55340)66ERROR(55341)67ERROR(55342)68ERROR(55343)69ERROR(55344)70ERROR(55345)71ERROR(55346)72ERROR(55347)73ERROR(55348)74ERROR(55349)75ERROR(55350)76ERROR(55351)77ERROR(55352)78ERROR(55353)79ERROR(55354)80ERROR(55355)81ERROR(55356)82ERROR(55357)83ERROR(55358)84ERROR(55359)85ERROR(55360)86ERROR(55361)87ERROR(55362)88ERROR(55363)89ERROR(55364)90ERROR(55365)91ERROR(55366)92ERROR(55367)93ERROR(55368)94ERROR(55369)95ERROR(55370)96ERROR(55371)97ERROR(55372)98ERROR(55373)99ERROR(55374)100ERROR(55375)101ERROR(55376)102ERROR(55377)103ERROR(55378)104ERROR(55379)105ERROR(55380)106ERROR(55381)107ERROR(55382)108ERROR(55383)109ERROR(55384)110ERROR(55385)111ERROR(55386)112ERROR(55387)113ERROR(55388)114ERROR(55389)115ERROR(55390)116ERROR(55391)117ERROR(55392)118ERROR(55393)119ERROR(55394)120ERROR(55395)121ERROR(55396)122ERROR(55397)123ERROR(55398)124ERROR(55399)125ERROR(55400)126ERROR(55401)127ERROR(55402)128ERROR(55403)129ERROR(55404)130ERROR(55405)131ERROR(55406)132ERROR(55407)133ERROR(55408)134ERROR(55409)135ERROR(55410)136ERROR(55411)137ERROR(55412)138ERROR(55413)139ERROR(55414)140ERROR(55415)141ERROR(55416)142ERROR(55417)143ERROR(55418)144ERROR(55419)145ERROR(55420)146ERROR(55421)147ERROR(55422)148ERROR(55423)149ERROR(55424)150ERROR(55425)151ERROR(55426)152ERROR(55427)153ERROR(55428)154ERROR(55429)155ERROR(55430)156ERROR(55431)157ERROR(55432)158ERROR(55433)159ERROR(55434)160ERROR(55435)161ERROR(55436)162ERROR(55437)163ERROR(55438)164ERROR(55439)165ERROR(55440)166ERROR(55441)167ERROR(55442)168ERROR(55443)169ERROR(55444)170ERROR(55445)171ERROR(55446)172ERROR(55447)173ERROR(55448)174ERROR(55449)175ERROR(55450)176ERROR(55451)177ERROR(55452)178ERROR(55453)179ERROR(55454)180ERROR(55455)181ERROR(55456)182ERROR(55457)183ERROR(55458)184ERROR(55459)185ERROR(55460)186ERROR(55461)187ERROR(55462)188ERROR(55463)189ERROR(55464)190ERROR(55465)191ERROR(55466)192ERROR(55467)193ERROR(55468)194ERROR(55469)195ERROR(55470)196ERROR(55471)197ERROR(55472)198ERROR(55473)199ERROR(55474)200ERROR(55475)201ERROR(55476)202ERROR(55477)203ERROR(55478)204ERROR(55479)205ERROR(55480)206ERROR(55481)207ERROR(55482)208ERROR(55483)209ERROR(55484)210ERROR(55485)211ERROR(55486)212ERROR(55487)213ERROR(55488)214ERROR(55489)215ERROR(55490)216ERROR(55491)217ERROR(55492)218ERROR(55493)219ERROR(55494)220ERROR(55495)221ERROR(55496)222ERROR(55497)223ERROR(55498)224ERROR(55499)225ERROR(55500)226ERROR(55501)227ERROR(55502)228ERROR(55503)229ERROR(55504)230ERROR(55505)231ERROR(55506)232ERROR(55507)233ERROR(55508)234ERROR(55509)235ERROR(55510)236ERROR(55511)237ERROR(55512)238ERROR(55513)239ERROR(55514)240ERROR(55515)241ERROR(55516)242ERROR(55517)243ERROR(55518)244ERROR(55519)245ERROR(55520)246ERROR(55521)247ERROR(55522)248ERROR(55523)249ERROR(55524)250ERROR(55525)251ERROR(55526)252ERROR(55527)253ERROR(55528)254ERROR(55529)255ERROR(55530)256ERROR(55531)257ERROR(55532)258ERROR(55533)259ERROR(55534)260ERROR(55535)261ERROR(55536)262ERROR(55537)263ERROR(55538)264ERROR(55539)265ERROR(55540)266ERROR(55541)267ERROR(55542)268ERROR(55543)269ERROR(55544)270ERROR(55545)271ERROR(55546)272ERROR(55547)273ERROR(55548)274ERROR(55549)275ERROR(55550)276ERROR(55551)277ERROR(55552)278ERROR(55553)279ERROR(55554)280ERROR(55555)281ERROR(55556)282ERROR(55557)283ERROR(55558)284ERROR(55559)285ERROR(55560)286ERROR(55561)287ERROR(55562)288ERROR(55563)289ERROR(55564)290ERROR(55565)291ERROR(55566)292ERROR(55567)293ERROR(55568)294ERROR(55569)295ERROR(55570)296ERROR(55571)297ERROR(55572)298ERROR(55573)299ERROR(55574)300ERROR(55575)301ERROR(55576)302ERROR(55577)303ERROR(55578)304ERROR(55579)305ERROR(55580)306ERROR(55581)307ERROR(55582)308ERROR(55583)309ERROR(55584)310ERROR(55585)311ERROR(55586)312ERROR(55587)313ERROR(55588)314ERROR(55589)315ERROR(55590)316ERROR(55591)317ERROR(55592)318ERROR(55593)319ERROR(55594)320ERROR(55595)321ERROR(55596)322ERROR(55597)323ERROR(55598)324ERROR(55599)325ERROR(55600)326ERROR(55601)327ERROR(55602)328ERROR(55603)329ERROR(55604)330ERROR(55605)331ERROR(55606)332ERROR(55607)333ERROR(55608)334ERROR(55609)335ERROR(55610)336ERROR(55611)337ERROR(55612)338ERROR(55613)339ERROR(55614)340ERROR(55615)341ERROR(55616)342ERROR(55617)343ERROR(55618)344ERROR(55619)345ERROR(55620)346ERROR(55621)347ERROR(55622)348ERROR(55623)349ERROR(55624)350ERROR(55625)351ERROR(55626)352ERROR(55627)353ERROR(55628)354ERROR(55629)355ERROR(55630)356ERROR(55631)357ERROR(55632)358ERROR(55633)359ERROR(55634)360ERROR(55635)361ERROR(55636)362ERROR(55637)363ERROR(55638)364ERROR(55639)365ERROR(55640)366ERROR(55641)367ERROR(55642)368ERROR(55643)369ERROR(55644)370ERROR(55645)371ERROR(55646)372ERROR(55647)373ERROR(55648)374ERROR(55649)375ERROR(55650)376ERROR(55651)377ERROR(55652)378ERROR(55653)379ERROR(55654)380ERROR(55655)381ERROR(55656)382ERROR(55657)383ERROR(55658)384ERROR(55659)385ERROR(55660)386ERROR(55661)387ERROR(55662)388ERROR(55663)389ERROR(55664)390ERROR(55665)391ERROR(55666)392ERROR(55667)393ERROR(55668)394ERROR(55669)395ERROR(55670)396ERROR(55671)397ERROR(55672)398ERROR(55673)399ERROR(55674)400ERROR(55675)401ERROR(55676)402ERROR(55677)403ERROR(55678)404ERROR(55679)405ERROR(55680)406ERROR(55681)407ERROR(55682)408ERROR(55683)409ERROR(55684)410ERROR(55685)411ERROR(55686)412ERROR(55687)413ERROR(55688)414ERROR(55689)415ERROR(55690)416ERROR(55691)417ERROR(55692)418ERROR(55693)419ERROR(55694)420ERROR(55695)421ERROR(55696)422ERROR(55697)423ERROR(55698)424ERROR(55699)425ERROR(55700)426ERROR(55701)427ERROR(55702)428ERROR(55703)429ERROR(55704)430ERROR(55705)431ERROR(55706)432ERROR(55707)433ERROR(55708)434ERROR(55709)435ERROR(55710)436ERROR(55711)437ERROR(55712)438ERROR(55713)439ERROR(55714)440ERROR(55715)441ERROR(55716)442ERROR(55717)443ERROR(55718)444ERROR(55719)445ERROR(55720)446ERROR(55721)447ERROR(55722)448ERROR(55723)449ERROR(55724)450ERROR(55725)451ERROR(55726)452ERROR(55727)453ERROR(55728)454ERROR(55729)455ERROR(55730)456ERROR(55731)457ERROR(55732)458ERROR(55733)459ERROR(55734)460ERROR(55735)461ERROR(55736)462ERROR(55737)463ERROR(55738)464ERROR(55739)465ERROR(55740)466ERROR(55741)467ERROR(55742)468ERROR(55743)469ERROR(55744)470ERROR(55745)471ERROR(55746)472ERROR(55747)473ERROR(55748)474ERROR(55749)475ERROR(55750)476ERROR(55751)477ERROR(55752)478ERROR(55753)479ERROR(55754)480ERROR(55755)481ERROR(55756)482ERROR(55757)483ERROR(55758)484ERROR(55759)485ERROR(55760)486ERROR(55761)487ERROR(55762)488ERROR(55763)489ERROR(55764)490ERROR(55765)491ERROR(55766)492ERROR(55767)493ERROR(55768)494ERROR(55769)495ERROR(55770)496ERROR(55771)497ERROR(55772)498ERROR(55773)499ERROR(55774)500ERROR(55775)501ERROR(55776)502ERROR(55777)503ERROR(55778)504ERROR(55779)505ERROR(55780)506ERROR(55781)507ERROR(55782)508ERROR(55783)509ERROR(55784)510ERROR(55785)511ERROR(55786)512ERROR(55787)513ERROR(55788)514ERROR(55789)515ERROR(55790)516ERROR(55791)517ERROR(55792)518ERROR(55793)519ERROR(55794)520ERROR(55795)521ERROR(55796)522ERROR(55797)523ERROR(55798)524ERROR(55799)525ERROR(55800)526ERROR(55801)527ERROR(55802)528ERROR(55803)529ERROR(55804)530ERROR(55805)531ERROR(55806)532ERROR(55807)533ERROR(55808)534ERROR(55809)535ERROR(55810)536ERROR(55811)537ERROR(55812)538ERROR(55813)539ERROR(55814)540ERROR(55815)541ERROR(55816)542ERROR(55817)543ERROR(55818)544ERROR(55819)545ERROR(55820)546ERROR(55821)547ERROR(55822)548ERROR(55823)549ERROR(55824)550ERROR(55825)551ERROR(55826)552ERROR(55827)553ERROR(55828)554ERROR(55829)555ERROR(55830)556ERROR(55831)557ERROR(55832)558ERROR(55833)559ERROR(55834)560ERROR(55835)561ERROR(55836)562ERROR(55837)563ERROR(55838)564ERROR(55839)565ERROR(55840)566ERROR(55841)567ERROR(55842)568ERROR(55843)569ERROR(55844)570ERROR(55845)571ERROR(55846)572ERROR(55847)573ERROR(55848)574ERROR(55849)575ERROR(55850)576ERROR(55851)577ERROR(55852)578ERROR(55853)579ERROR(55854)580ERROR(55855)581ERROR(55856)582ERROR(55857)583ERROR(55858)584ERROR(55859)585ERROR(55860)586ERROR(55861)587ERROR(55862)588ERROR(55863)589ERROR(55864)590ERROR(55865)591ERROR(55866)592ERROR(55867)593ERROR(55868)594ERROR(55869)595ERROR(55870)596ERROR(55871)597ERROR(55872)598ERROR(55873)599ERROR(55874)600ERROR(55875)601ERROR(55876)602ERROR(55877)603ERROR(55878)604ERROR(55879)605ERROR(55880)606ERROR(55881)607ERROR(55882)608ERROR(55883)609ERROR(55884)610ERROR(55885)611ERROR(55886)612ERROR(55887)613ERROR(55888)614ERROR(55889)615ERROR(55890)616ERROR(55891)617ERROR(55892)618ERROR(55893)619ERROR(55894)620ERROR(55895)621ERROR(55896)622ERROR(55897)623ERROR(55898)624ERROR(55899)625ERROR(55900)626ERROR(55901)627ERROR(55902)628ERROR(55903)629ERROR(55904)630ERROR(55905)631ERROR(55906)632ERROR(55907)633ERROR(55908)634ERROR(55909)635ERROR(55910)636ERROR(55911)637ERROR(55912)638ERROR(55913)639ERROR(55914)640ERROR(55915)641ERROR(55916)642ERROR(55917)643ERROR(55918)644ERROR(55919)645ERROR(55920)646ERROR(55921)647ERROR(55922)648ERROR(55923)649ERROR(55924)650ERROR(55925)651ERROR(55926)652ERROR(55927)653ERROR(55928)654ERROR(55929)655ERROR(55930)656ERROR(55931)657ERROR(55932)658ERROR(55933)659ERROR(55934)660ERROR(55935)661ERROR(55936)662ERROR(55937)663ERROR(55938)664ERROR(55939)665ERROR(55940)666ERROR(55941)667ERROR(55942)668ERROR(55943)669ERROR(55944)670ERROR(55945)671ERROR(55946)672ERROR(55947)673ERROR(55948)674ERROR(55949)675ERROR(55950)676ERROR(55951)677ERROR(55952)678ERROR(55953)679ERROR(55954)680ERROR(55955)681ERROR(55956)682ERROR(55957)683ERROR(55958)684ERROR(55959)685ERROR(55960)686ERROR(55961)687ERROR(55962)688ERROR(55963)689ERROR(55964)690ERROR(55965)691ERROR(55966)692ERROR(55967)693ERROR(55968)694ERROR(55969)695ERROR(55970)696ERROR(55971)697ERROR(55972)698ERROR(55973)699ERROR(55974)700ERROR(55975)701ERROR(55976)702ERROR(55977)703ERROR(55978)704ERROR(55979)705ERROR(55980)706ERROR(55981)707ERROR(55982)708ERROR(55983)709ERROR(55984)710ERROR(55985)711ERROR(55986)712ERROR(55987)713ERROR(55988)714ERROR(55989)715ERROR(55990)716ERROR(55991)717ERROR(55992)718ERROR(55993)719ERROR(55994)720ERROR(55995)721ERROR(55996)722ERROR(55997)723ERROR(55998)724ERROR(55999)725ERROR(56000)726ERROR(56001)727ERROR(56002)728ERROR(56003)729ERROR(56004)730ERROR(56005)731ERROR(56006)732ERROR(56007)733ERROR(56008)734ERROR(56009)735ERROR(56010)736ERROR(56011)737ERROR(56012)738ERROR(56013)739ERROR(56014)740ERROR(56015)741ERROR(56016)742ERROR(56017)743ERROR(56018)744ERROR(56019)745ERROR(56020)746ERROR(56021)747ERROR(56022)748ERROR(56023)749ERROR(56024)750ERROR(56025)751ERROR(56026)752ERROR(56027)753ERROR(56028)754ERROR(56029)755ERROR(56030)756ERROR(56031)757ERROR(56032)758ERROR(56033)759ERROR(56034)760ERROR(56035)761ERROR(56036)762ERROR(56037)763ERROR(56038)764ERROR(56039)765ERROR(56040)766ERROR(56041)767ERROR(56042)768ERROR(56043)769ERROR(56044)770ERROR(56045)771ERROR(56046)772ERROR(56047)773ERROR(56048)774ERROR(56049)775ERROR(56050)776ERROR(56051)777ERROR(56052)778ERROR(56053)779ERROR(56054)780ERROR(56055)781ERROR(56056)782ERROR(56057)783ERROR(56058)784ERROR(56059)785ERROR(56060)786ERROR(56061)787ERROR(56062)788ERROR(56063)789ERROR(56064)790ERROR(56065)791ERROR(56066)792ERROR(56067)793ERROR(56068)794ERROR(56069)795ERROR(56070)796ERROR(56071)797ERROR(56072)798ERROR(56073)799ERROR(56074)800ERROR(56075)801ERROR(56076)802ERROR(56077)803ERROR(56078)804ERROR(56079)805ERROR(56080)806ERROR(56081)807ERROR(56082)808ERROR(56083)809ERROR(56084)810ERROR(56085)811ERROR(56086)812ERROR(56087)813ERROR(56088)814ERROR(56089)815ERROR(56090)816ERROR(56091)817ERROR(56092)818ERROR(56093)819ERROR(56094)820ERROR(56095)821ERROR(56096)822ERROR(56097)823ERROR(56098)824ERROR(56099)825ERROR(56100)826ERROR(56101)827ERROR(56102)828ERROR(56103)829ERROR(56104)830ERROR(56105)831ERROR(56106)832ERROR(56107)833ERROR(56108)834ERROR(56109)835ERROR(56110)836ERROR(56111)837ERROR(56112)838ERROR(56113)839ERROR(56114)840ERROR(56115)841ERROR(56116)842ERROR(56117)843ERROR(56118)844ERROR(56119)845ERROR(56120)846ERROR(56121)847ERROR(56122)848ERROR(56123)849ERROR(56124)850ERROR(56125)851ERROR(56126)852ERROR(56127)853ERROR(56128)854ERROR(56129)855ERROR(56130)856ERROR(56131)857ERROR(56132)858ERROR(56133)859ERROR(56134)860ERROR(56135)861ERROR(56136)862ERROR(56137)863ERROR(56138)864ERROR(56139)865ERROR(56140)866ERROR(56141)867ERROR(56142)868ERROR(56143)869ERROR(56144)870ERROR(56145)871ERROR(56146)872ERROR(56147)873ERROR(56148)874ERROR(56149)875ERROR(56150)876ERROR(56151)877ERROR(56152)878ERROR(56153)879ERROR(56154)880ERROR(56155)881ERROR(56156)882ERROR(56157)883ERROR(56158)884ERROR(56159)885ERROR(56160)886ERROR(56161)887ERROR(56162)888ERROR(56163)889ERROR(56164)890ERROR(56165)891ERROR(56166)892ERROR(56167)893ERROR(56168)894ERROR(56169)895ERROR(56170)896ERROR(56171)897ERROR(56172)898ERROR(56173)899ERROR(56174)900ERROR(56175)901ERROR(56176)902ERROR(56177)903ERROR(56178)904ERROR(56179)905ERROR(56180)906ERROR(56181)907ERROR(56182)908ERROR(56183)909ERROR(56184)910ERROR(56185)911ERROR(56186)912ERROR(56187)913ERROR(56188)914ERROR(56189)915ERROR(56190)916ERROR(56191)917ERROR(56192)918ERROR(56193)919ERROR(56194)920ERROR(56195)921ERROR(56196)922ERROR(56197)923ERROR(56198)924ERROR(56199)925ERROR(56200)926ERROR(56201)927ERROR(56202)928ERROR(56203)929ERROR(56204)930ERROR(56205)931ERROR(56206)932ERROR(56207)933ERROR(56208)934ERROR(56209)935ERROR(56210)936ERROR(56211)937ERROR(56212)938ERROR(56213)939ERROR(56214)940ERROR(56215)941ERROR(56216)942ERROR(56217)943ERROR(56218)944ERROR(56219)945ERROR(56220)946ERROR(56221)947ERROR(56222)948ERROR(56223)949ERROR(56224)950ERROR(56225)951ERROR(56226)952ERROR(56227)953ERROR(56228)954ERROR(56229)955ERROR(56230)956ERROR(56231)957ERROR(56232)958ERROR(56233)959ERROR(56234)960ERROR(56235)961ERROR(56236)962ERROR(56237)963ERROR(56238)964ERROR(56239)965ERROR(56240)966ERROR(56241)967ERROR(56242)968ERROR(56243)969ERROR(56244)970ERROR(56245)971ERROR(56246)972ERROR(56247)973ERROR(56248)974ERROR(56249)975ERROR(56250)976ERROR(56251)977ERROR(56252)978ERROR(56253)979ERROR(56254)980ERROR(56255)981ERROR(56256)982ERROR(56257)983ERROR(56258)984ERROR(56259)985ERROR(56260)986ERROR(56261)987ERROR(56262)988ERROR(56263)989ERROR(56264)990ERROR(56265)991ERROR(56266)992ERROR(56267)993ERROR(56268)994ERROR(56269)995ERROR(56270)996ERROR(56271)997ERROR(56272)998ERROR(56273)999ERROR(56274)1000ERROR(56275)1001ERROR(56276)1002ERROR(56277)1003ERROR(56278)1004ERROR(56279)1005ERROR(56280)1006ERROR(56281)1007ERROR(56282)1008ERROR(56283)1009ERROR(56284)1010ERROR(56285)1011ERROR(56286)1012ERROR(56287)1013ERROR(56288)1014ERROR(56289)1015ERROR(56290)1016ERROR(56291)1017ERROR(56292)1018ERROR(56293)1019ERROR(56294)1020ERROR(56295)1021ERROR(56296)1022ERROR(56297)1023ERROR(56298)1024ERROR(56299)1025ERROR(56300)1026ERROR(56301)1027ERROR(56302)1028ERROR(56303)1029ERROR(56304)1030ERROR(56305)1031ERROR(56306)1032ERROR(56307)1033ERROR(56308)1034ERROR(56309)1035ERROR(56310)1036ERROR(56311)1037ERROR(56312)1038ERROR(56313)1039ERROR(56314)1040ERROR(56315)1041ERROR(56316)1042ERROR(56317)1043ERROR(56318)1044ERROR(56319)1045ERROR(56320)1046ERROR(56321)1047ERROR(56322)1048ERROR(56323)1049ERROR(56324)1050ERROR(56325)1051ERROR(56326)1052ERROR(56327)1053ERROR(56328)1054ERROR(56329)1055ERROR(56330)1056ERROR(56331)1057ERROR(56332)1058ERROR(56333)1059ERROR(56334)1060ERROR(56335)1061ERROR(56336)1062ERROR(56337)1063ERROR(56338)1064ERROR(56339)1065ERROR(56340)1066ERROR(56341)1067ERROR(56342)1068ERROR(56343)1069ERROR(56344)1070ERROR(56345)1071ERROR(56346)1072ERROR(56347)1073ERROR(56348)1074ERROR(56349)1075ERROR(56350)1076ERROR(56351)1077ERROR(56352)1078ERROR(56353)1079ERROR(56354)1080ERROR(56355)1081ERROR(56356)1082ERROR(56357)1083ERROR(56358)1084ERROR(56359)1085ERROR(56360)1086ERROR(56361)1087ERROR(56362)1088ERROR(56363)1089ERROR(56364)1090ERROR(56365)1091ERROR(56366)1092ERROR(56367)1093ERROR(56368)1094ERROR(56369)1095ERROR(56370)1096ERROR(56371)1097ERROR(56372)1098ERROR(56373)1099ERROR(56374)1100ERROR(56375)1101ERROR(56376)1102ERROR(56377)1103ERROR(56378)1104ERROR(56379)1105ERROR(56380)1106ERROR(56381)1107ERROR(56382)1108ERROR(56383)1109ERROR(56384)1110ERROR(56385)1111ERROR(56386)1112ERROR(56387)1113ERROR(56388)1114ERROR(56389)1115ERROR(56390)1116ERROR(56391)1117ERROR(56392)1118ERROR(56393)1119ERROR(56394)1120ERROR(56395)1121ERROR(56396)1122ERROR(56397)1123ERROR(56398)1124ERROR(56399)1125ERROR(56400)1126ERROR(56401)1127ERROR(56402)1128ERROR(56403)1129ERROR(56404)1130ERROR(56405)1131ERROR(56406)1132ERROR(56407)1133ERROR(56408)1134ERROR(56409)1135ERROR(56410)1136ERROR(56411)1137ERROR(56412)1138ERROR(56413)1139ERROR(56414)1140ERROR(56415)1141ERROR(56416)1142ERROR(56417)1143ERROR(56418)1144ERROR(56419)1145ERROR(56420)1146ERROR(56421)1147ERROR(56422)1148ERROR(56423)1149ERROR(56424)1150ERROR(56425)1151ERROR(56426)1152ERROR(56427)1153ERROR(56428)1154ERROR(56429)1155ERROR(56430)1156ERROR(56431)1157ERROR(56432)1158ERROR(56433)1159ERROR(56434)1160ERROR(56435)1161ERROR(56436)1162ERROR(56437)1163ERROR(56438)1164ERROR(56439)1165ERROR(56440)1166ERROR(56441)1167ERROR(56442)1168ERROR(56443)1169ERROR(56444)1170ERROR(56445)1171ERROR(56446)1172ERROR(56447)1173ERROR(56448)1174ERROR(56449)1175ERROR(56450)1176ERROR(56451)1177ERROR(56452)1178ERROR(56453)1179ERROR(56454)1180ERROR(56455)1181ERROR(56456)1182ERROR(56457)1183ERROR(56458)1184ERROR(56459)1185ERROR(56460)1186ERROR(56461)1187ERROR(56462)1188ERROR(56463)1189ERROR(56464)1190ERROR(56465)1191ERROR(56466)1192ERROR(56467)1193ERROR(56468)1194ERROR(56469)1195ERROR(56470)1196ERROR(56471)1197ERROR(56472)1198ERROR(56473)1199ERROR(56474)1200ERROR(56475)1201ERROR(56476)1202ERROR(56477)1203ERROR(56478)1204ERROR(56479)1205ERROR(56480)1206ERROR(56481)1207ERROR(56482)1208ERROR(56483)1209ERROR(56484)1210ERROR(56485)1211ERROR(56486)1212ERROR(56487)1213ERROR(56488)1214ERROR(56489)1215ERROR(56490)1216ERROR(56491)1217ERROR(56492)1218ERROR(56493)1219ERROR(56494)1220ERROR(56495)1221ERROR(56496)1222ERROR(56497)1223ERROR(56498)1224ERROR(56499)1225ERROR(56500)1226ERROR(56501)1227ERROR(56502)1228ERROR(56503)1229ERROR(56504)1230ERROR(56505)1231ERROR(56506)1232ERROR(56507)1233ERROR(56508)1234ERROR(56509)1235ERROR(56510)1236ERROR(56511)1237ERROR(56512)1238ERROR(56513)1239ERROR(56514)1240ERROR(56515)1241ERROR(56516)1242ERROR(56517)1243ERROR(56518)1244ERROR(56519)1245ERROR(56520)1246ERROR(56521)1247ERROR(56522)1248ERROR(56523)1249ERROR(56524)1250ERROR(56525)1251ERROR(56526)1252ERROR(56527)1253ERROR(56528)1254ERROR(56529)1255ERROR(56530)1256ERROR(56531)1257ERROR(56532)1258ERROR(56533)1259ERROR(56534)1260ERROR(56535)1261ERROR(56536)1262ERROR(56537)1263ERROR(56538)1264ERROR(56539)1265ERROR(56540)1266ERROR(56541)1267ERROR(56542)1268ERROR(56543)1269ERROR(56544)1270ERROR(56545)1271ERROR(56546)1272ERROR(56547)1273ERROR(56548)1274ERROR(56549)1275ERROR(56550)1276ERROR(56551)1277ERROR(56552)1278ERROR(56553)1279ERROR(56554)1280ERROR(56555)1281ERROR(56556)1282ERROR(56557)1283ERROR(56558)1284ERROR(56559)1285ERROR(56560)1286ERROR(56561)1287ERROR(56562)1288ERROR(56563)1289ERROR(56564)1290ERROR(56565)1291ERROR(56566)1292ERROR(56567)1293ERROR(56568)1294ERROR(56569)1295ERROR(56570)1296ERROR(56571)1297ERROR(56572)1298ERROR(56573)1299ERROR(56574)1300ERROR(56575)1301ERROR(56576)1302ERROR(56577)1303ERROR(56578)1304ERROR(56579)1305ERROR(56580)1306ERROR(56581)1307ERROR(56582)1308ERROR(56583)1309ERROR(56584)1310ERROR(56585)1311ERROR(56586)1312ERROR(56587)1313ERROR(56588)1314ERROR(56589)1315ERROR(56590)1316ERROR(56591)1317ERROR(56592)1318ERROR(56593)1319ERROR(56594)1320ERROR(56595)1321ERROR(56596)1322ERROR(56597)1323ERROR(56598)1324ERROR(56599)1325ERROR(56600)1326ERROR(56601)1327ERROR(56602)1328ERROR(56603)1329ERROR(56604)1330ERROR(56605)1331ERROR(56606)1332ERROR(56607)1333ERROR(56608)1334ERROR(56609)1335ERROR(56610)1336ERROR(56611)1337ERROR(56612)1338ERROR(56613)1339ERROR(56614)1340ERROR(56615)1341ERROR(56616)1342ERROR(56617)1343ERROR(56618)1344ERROR(56619)1345ERROR(56620)1346ERROR(56621)1347ERROR(56622)1348ERROR(56623)1349ERROR(56624)1350ERROR(56625)1351ERROR(56626)1352ERROR(56627)1353ERROR(56628)1354ERROR(56629)1355ERROR(56630)1356ERROR(56631)1357ERROR(56632)1358ERROR(56633)1359ERROR(56634)1360ERROR(56635)1361ERROR(56636)1362ERROR(56637)1363ERROR(56638)1364ERROR(56639)1365ERROR(56640)1366ERROR(56641)1367ERROR(56642)1368ERROR(56643)1369ERROR(56644)1370ERROR(56645)1371ERROR(56646)1372ERROR(56647)1373ERROR(56648)1374ERROR(56649)1375ERROR(56650)1376ERROR(56651)1377ERROR(56652)1378ERROR(56653)1379ERROR(56654)1380ERROR(56655)1381ERROR(56656)1382ERROR(56657)1383ERROR(56658)1384ERROR(56659)1385ERROR(56660)1386ERROR(56661)1387ERROR(56662)1388ERROR(56663)1389ERROR(56664)1390ERROR(56665)1391ERROR(56666)1392ERROR(56667)1393ERROR(56668)1394ERROR(56669)1395ERROR(56670)1396ERROR(56671)1397ERROR(56672)1398ERROR(56673)1399ERROR(56674)1400ERROR(56675)1401ERROR(56676)1402ERROR(56677)1403ERROR(56678)1404ERROR(56679)1405ERROR(56680)1406ERROR(56681)1407ERROR(56682)1408ERROR(56683)1409ERROR(56684)1410ERROR(56685)1411ERROR(56686)1412ERROR(56687)1413ERROR(56688)1414ERROR(56689)1415ERROR(56690)1416ERROR(56691)1417ERROR(56692)1418ERROR(56693)1419ERROR(56694)1420ERROR(56695)1421ERROR(56696)1422ERROR(56697)1423ERROR(56698)1424ERROR(56699)1425ERROR(56700)1426ERROR(56701)1427ERROR(56702)1428ERROR(56703)1429ERROR(56704)1430ERROR(56705)1431ERROR(56706)1432ERROR(56707)1433ERROR(56708)1434ERROR(56709)1435ERROR(56710)1436ERROR(56711)1437ERROR(56712)1438ERROR(56713)1439ERROR(56714)1440ERROR(56715)1441ERROR(56716)1442ERROR(56717)1443ERROR(56718)1444ERROR(56719)1445ERROR(56720)1446ERROR(56721)1447ERROR(56722)1448ERROR(56723)1449ERROR(56724)1450ERROR(56725)1451ERROR(56726)1452ERROR(56727)1453ERROR(56728)1454ERROR(56729)1455ERROR(56730)1456ERROR(56731)1457ERROR(56732)1458ERROR(56733)1459ERROR(56734)1460ERROR(56735)1461ERROR(56736)1462ERROR(56737)1463ERROR(56738)1464ERROR(56739)1465ERROR(56740)1466ERROR(56741)1467ERROR(56742)1468ERROR(56743)1469ERROR(56744)1470ERROR(56745)1471ERROR(56746)1472ERROR(56747)1473ERROR(56748)1474ERROR(56749)1475ERROR(56750)1476ERROR(56751)1477ERROR(56752)1478ERROR(56753)1479ERROR(56754)1480ERROR(56755)1481ERROR(56756)1482ERROR(56757)1483ERROR(56758)1484ERROR(56759)1485ERROR(56760)1486ERROR(56761)1487ERROR(56762)1488ERROR(56763)1489ERROR(56764)1490ERROR(56765)1491ERROR(56766)1492ERROR(56767)1493ERROR(56768)1494ERROR(56769)1495ERROR(56770)1496ERROR(56771)1497ERROR(56772)1498ERROR(56773)1499ERROR(56774)1500ERROR(56775)1501ERROR(56776)1502ERROR(56777)1503ERROR(56778)1504ERROR(56779)1505ERROR(56780)1506ERROR(56781)1507ERROR(56782)1508ERROR(56783)1509ERROR(56784)1510ERROR(56785)1511ERROR(56786)1512ERROR(56787)1513ERROR(56788)1514ERROR(56789)1515ERROR(56790)1516ERROR(56791)1517ERROR(56792)1518ERROR(56793)1519ERROR(56794)1520ERROR(56795)1521ERROR(56796)1522ERROR(56797)1523ERROR(56798)1524ERROR(56799)1525ERROR(56800)1526ERROR(56801)1527ERROR(56802)1528ERROR(56803)1529ERROR(56804)1530ERROR(56805)1531ERROR(56806)1532ERROR(56807)1533ERROR(56808)1534ERROR(56809)1535ERROR(56810)1536ERROR(56811)1537ERROR(56812)1538ERROR(56813)1539ERROR(56814)1540ERROR(56815)1541ERROR(56816)1542ERROR(56817)1543ERROR(56818)1544ERROR(56819)1545ERROR(56820)1546ERROR(56821)1547ERROR(56822)1548ERROR(56823)1549ERROR(56824)1550ERROR(56825)1551ERROR(56826)1552ERROR(56827)1553ERROR(56828)1554ERROR(56829)1555ERROR(56830)1556ERROR(56831)1557ERROR(56832)1558ERROR(56833)1559ERROR(56834)1560ERROR(56835)1561ERROR(56836)1562ERROR(56837)1563ERROR(56838)1564ERROR(56839)1565ERROR(56840)1566ERROR(56841)1567ERROR(56842)1568ERROR(56843)1569ERROR(56844)1570ERROR(56845)1571ERROR(56846)1572ERROR(56847)1573ERROR(56848)1574ERROR(56849)1575ERROR(56850)1576ERROR(56851)1577ERROR(56852)1578ERROR(56853)1579ERROR(56854)1580ERROR(56855)1581ERROR(56856)1582ERROR(56857)1583ERROR(56858)1584ERROR(56859)1585ERROR(56860)1586ERROR(56861)1587ERROR(56862)1588ERROR(56863)1589ERROR(56864)1590ERROR(56865)1591ERROR(56866)1592ERROR(56867)1593ERROR(56868)1594ERROR(56869)1595ERROR(56870)1596ERROR(56871)1597ERROR(56872)1598ERROR(56873)1599ERROR(56874)1600ERROR(56875)1601ERROR(56876)1602ERROR(56877)1603ERROR(56878)1604ERROR(56879)1605ERROR(56880)1606ERROR(56881)1607ERROR(56882)1608ERROR(56883)1609ERROR(56884)1610ERROR(56885)1611ERROR(56886)1612ERROR(56887)1613ERROR(56888)1614ERROR(56889)1615ERROR(56890)1616ERROR(56891)1617ERROR(56892)1618ERROR(56893)1619ERROR(56894)1620ERROR(56895)1621ERROR(56896)1622ERROR(56897)1623ERROR(56898)1624ERROR(56899)1625ERROR(56900)1626ERROR(56901)1627ERROR(56902)1628ERROR(56903)1629ERROR(56904)1630ERROR(56905)1631ERROR(56906)1632ERROR(56907)1633ERROR(56908)1634ERROR(56909)1635ERROR(56910)1636ERROR(56911)1637ERROR(56912)1638ERROR(56913)1639ERROR(56914)1640ERROR(56915)1641ERROR(56916)1642ERROR(56917)1643ERROR(56918)1644ERROR(56919)1645ERROR(56920)1646ERROR(56921)1647ERROR(56922)1648ERROR(56923)1649ERROR(56924)1650ERROR(56925)1651ERROR(56926)1652ERROR(56927)1653ERROR(56928)1654ERROR(56929)1655ERROR(56930)1656ERROR(56931)1657ERROR(56932)1658ERROR(56933)1659ERROR(56934)1660ERROR(56935)1661ERROR(56936)1662ERROR(56937)1663ERROR(56938)1664ERROR(56939)1665ERROR(56940)1666ERROR(56941)1667ERROR(56942)1668ERROR(56943)1669ERROR(56944)1670ERROR(56945)1671ERROR(56946)1672ERROR(56947)1673ERROR(56948)1674ERROR(56949)1675ERROR(56950)1676ERROR(56951)1677ERROR(56952)1678ERROR(56953)1679ERROR(56954)1680ERROR(56955)1681ERROR(56956)1682ERROR(56957)1683ERROR(56958)1684ERROR(56959)1685ERROR(56960)1686ERROR(56961)1687ERROR(56962)1688ERROR(56963)1689ERROR(56964)1690ERROR(56965)1691ERROR(56966)1692ERROR(56967)1693ERROR(56968)1694ERROR(56969)1695ERROR(56970)1696ERROR(56971)1697ERROR(56972)1698ERROR(56973)1699ERROR(56974)1700ERROR(56975)1701ERROR(56976)1702ERROR(56977)1703ERROR(56978)1704ERROR(56979)1705ERROR(56980)1706ERROR(56981)1707ERROR(56982)1708ERROR(56983)1709ERROR(56984)1710ERROR(56985)1711ERROR(56986)1712ERROR(56987)1713ERROR(56988)1714ERROR(56989)1715ERROR(56990)1716ERROR(56991)1717ERROR(56992)1718ERROR(56993)1719ERROR(56994)1720ERROR(56995)1721ERROR(56996)1722ERROR(56997)1723ERROR(56998)1724ERROR(56999)1725ERROR(57000)1726ERROR(57001)1727ERROR(57002)1728ERROR(57003)1729ERROR(57004)1730ERROR(57005)1731ERROR(57006)1732ERROR(57007)1733ERROR(57008)1734ERROR(57009)1735ERROR(57010)1736ERROR(57011)1737ERROR(57012)1738ERROR(57013)1739ERROR(57014)1740ERROR(57015)1741ERROR(57016)1742ERROR(57017)1743ERROR(57018)1744ERROR(57019)1745ERROR(57020)1746ERROR(57021)1747ERROR(57022)1748ERROR(57023)1749ERROR(57024)1750ERROR(57025)1751ERROR(57026)1752ERROR(57027)1753ERROR(57028)1754ERROR(57029)1755ERROR(57030)1756ERROR(57031)1757ERROR(57032)1758ERROR(57033)1759ERROR(57034)1760ERROR(57035)1761ERROR(57036)1762ERROR(57037)1763ERROR(57038)1764ERROR(57039)1765ERROR(57040)1766ERROR(57041)1767ERROR(57042)1768ERROR(57043)1769ERROR(57044)1770ERROR(57045)1771ERROR(57046)1772ERROR(57047)1773ERROR(57048)1774ERROR(57049)1775ERROR(57050)1776ERROR(57051)1777ERROR(57052)1778ERROR(57053)1779ERROR(57054)1780ERROR(57055)1781ERROR(57056)1782ERROR(57057)1783ERROR(57058)1784ERROR(57059)1785ERROR(57060)1786ERROR(57061)1787ERROR(57062)1788ERROR(57063)1789ERROR(57064)1790ERROR(57065)1791ERROR(57066)1792ERROR(57067)1793ERROR(57068)1794ERROR(57069)1795ERROR(57070)1796ERROR(57071)1797ERROR(57072)1798ERROR(57073)1799ERROR(57074)1800ERROR(57075)1801ERROR(57076)1802ERROR(57077)1803ERROR(57078)1804ERROR(57079)1805ERROR(57080)1806ERROR(57081)1807ERROR(57082)1808ERROR(57083)1809ERROR(57084)1810ERROR(57085)1811ERROR(57086)1812ERROR(57087)1813ERROR(57088)1814ERROR(57089)1815ERROR(57090)1816ERROR(57091)1817ERROR(57092)1818ERROR(57093)1819ERROR(57094)1820ERROR(57095)1821ERROR(57096)1822ERROR(57097)1823ERROR(57098)1824ERROR(57099)1825ERROR(57100)1826ERROR(57101)1827ERROR(57102)1828ERROR(57103)1829ERROR(57104)1830ERROR(57105)1831ERROR(57106)1832ERROR(57107)1833ERROR(57108)1834ERROR(57109)1835ERROR(57110)1836ERROR(57111)1837ERROR(57112)1838ERROR(57113)1839ERROR(57114)1840ERROR(57115)1841ERROR(57116)1842ERROR(57117)1843ERROR(57118)1844ERROR(57119)1845ERROR(57120)1846ERROR(57121)1847ERROR(57122)1848ERROR(57123)1849ERROR(57124)1850ERROR(57125)1851ERROR(57126)1852ERROR(57127)1853ERROR(57128)1854ERROR(57129)1855ERROR(57130)1856ERROR(57131)1857ERROR(57132)1858ERROR(57133)1859ERROR(57134)1860ERROR(57135)1861ERROR(57136)1862ERROR(57137)1863ERROR(57138)1864ERROR(57139)1865ERROR(57140)1866ERROR(57141)1867ERROR(57142)1868ERROR(57143)1869ERROR(57144)1870ERROR(57145)1871ERROR(57146)1872ERROR(57147)1873ERROR(57148)1874ERROR(57149)1875ERROR(57150)1876ERROR(57151)1877ERROR(57152)1878ERROR(57153)1879ERROR(57154)1880ERROR(57155)1881ERROR(57156)1882ERROR(57157)1883ERROR(57158)1884ERROR(57159)1885ERROR(57160)1886ERROR(57161)1887ERROR(57162)1888ERROR(57163)1889ERROR(57164)1890ERROR(57165)1891ERROR(57166)1892ERROR(57167)1893ERROR(57168)1894ERROR(57169)1895ERROR(57170)1896ERROR(57171)1897ERROR(57172)1898ERROR(57173)1899ERROR(57174)1900ERROR(57175)1901ERROR(57176)1902ERROR(57177)1903ERROR(57178)1904ERROR(57179)1905ERROR(57180)1906ERROR(57181)1907ERROR(57182)1908ERROR(57183)1909ERROR(57184)1910ERROR(57185)1911ERROR(57186)1912ERROR(57187)1913ERROR(57188)1914ERROR(57189)1915ERROR(57190)1916ERROR(57191)1917ERROR(57192)1918ERROR(57193)1919ERROR(57194)1920ERROR(57195)1921ERROR(57196)1922ERROR(57197)1923ERROR(57198)1924ERROR(57199)1925ERROR(57200)1926ERROR(57201)1927ERROR(57202)1928ERROR(57203)1929ERROR(57204)1930ERROR(57205)1931ERROR(57206)1932ERROR(57207)1933ERROR(57208)1934ERROR(57209)1935ERROR(57210)1936ERROR(57211)1937ERROR(57212)1938ERROR(57213)1939ERROR(57214)1940ERROR(57215)1941ERROR(57216)1942ERROR(57217)1943ERROR(57218)1944ERROR(57219)1945ERROR(57220)1946ERROR(57221)1947ERROR(57222)1948ERROR(57223)1949ERROR(57224)1950ERROR(57225)1951ERROR(57226)1952ERROR(57227)1953ERROR(57228)1954ERROR(57229)1955ERROR(57230)1956ERROR(57231)1957ERROR(57232)1958ERROR(57233)1959ERROR(57234)1960ERROR(57235)1961ERROR(57236)1962ERROR(57237)1963ERROR(57238)1964ERROR(57239)1965ERROR(57240)1966ERROR(57241)1967ERROR(57242)1968ERROR(57243)1969ERROR(57244)1970ERROR(57245)1971ERROR(57246)1972ERROR(57247)1973ERROR(57248)1974ERROR(57249)1975ERROR(57250)1976ERROR(57251)1977ERROR(57252)1978ERROR(57253)1979ERROR(57254)1980ERROR(57255)1981ERROR(57256)1982ERROR(57257)1983ERROR(57258)1984ERROR(57259)1985ERROR(57260)1986ERROR(57261)1987ERROR(57262)1988ERROR(57263)1989ERROR(57264)1990ERROR(57265)1991ERROR(57266)1992ERROR(57267)1993ERROR(57268)1994ERROR(57269)1995ERROR(57270)1996ERROR(57271)1997ERROR(57272)1998ERROR(57273)1999ERROR(57274)2000ERROR(57275)2001ERROR(57276)2002ERROR(57277)2003ERROR(57278)2004ERROR(57279)2005ERROR(57280)2006ERROR(57281)2007ERROR(57282)2008ERROR(57283)2009ERROR(57284)2010ERROR(57285)2011ERROR(57286)2012ERROR(57287)2013ERROR(57288)2014ERROR(57289)2015ERROR(57290)2016ERROR(57291)2017ERROR(57292)2018ERROR(57293)2019ERROR(57294)2020ERROR(57295)2021ERROR(57296)2022ERROR(57297)2023ERROR(57298)2024ERROR(57299)2025ERROR(57300)2026ERROR(57301)2027ERROR(57302)2028ERROR(57303)2029ERROR(57304)2030ERROR(57305)2031ERROR(57306)2032ERROR(57307)2033ERROR(57308)2034ERROR(57309)2035ERROR(57310)2036ERROR(57311)2037ERROR(57312)2038ERROR(57313)2039ERROR(57314)2040ERROR(57315)2041ERROR(57316)2042ERROR(57317)2043ERROR(57318)2044ERROR(57319)2045ERROR(57320)2046ERROR(57321)2047ERROR(57322)2048ERROR(57323)2049ERROR(57324)2050ERROR(57325)2051ERROR(57326)2052ERROR(57327)2053ERROR(57328)2054ERROR(57329)2055ERROR(57330)2056ERROR(57331)2057ERROR(57332)2058ERROR(57333)2059ERROR(57334)2060ERROR(57335)2061ERROR(57336)2062ERROR(57337)2063ERROR(57338)2064ERROR(57339)2065ERROR(57340)2066ERROR(57341)2067ERROR(57342)2068ERROR(57343)2069OK...

Full Screen

Full Screen

prod.inc.php

Source:prod.inc.php Github

copy

Full Screen

...15$_jpg_messages = array(16/*17** Headers already sent error. This is formatted as HTML different since this will be sent back directly as text18*/1910 => array('<table border=1><tr><td><font color=darkred size=4><b>JpGraph Error:</b>20HTTP headers have already been sent.<br>Caused by output from file <b>%s</b> at line <b>%d</b>.</font></td></tr><tr><td><b>Explanation:</b><br>HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it\'s image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).<p>Most likely you have some text in your script before the call to <i>Graph::Stroke()</i>. If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser. <p>For example it is a common mistake to leave a blank line before the opening "<b>&lt;?php</b>".</td></tr></table>',2),2111 => array(DEFAULT_ERROR_MESSAGE.'11',0),2212 => array(DEFAULT_ERROR_MESSAGE.'12',0),2313 => array(DEFAULT_ERROR_MESSAGE.'13',0),242001 => array(DEFAULT_ERROR_MESSAGE.'2001',0),252002 => array(DEFAULT_ERROR_MESSAGE.'2002',0),262003 => array(DEFAULT_ERROR_MESSAGE.'2003',0),272004 => array(DEFAULT_ERROR_MESSAGE.'2004',0),282005 => array(DEFAULT_ERROR_MESSAGE.'2005',0),292006 => array(DEFAULT_ERROR_MESSAGE.'2006',0),302007 => array(DEFAULT_ERROR_MESSAGE.'2007',0),312008 => array(DEFAULT_ERROR_MESSAGE.'2008',0),322009 => array(DEFAULT_ERROR_MESSAGE.'2009',0),332010 => array(DEFAULT_ERROR_MESSAGE.'2010',0),...

Full Screen

Full Screen

APIManager.swift

Source:APIManager.swift Github

copy

Full Screen

...20 }21 22 //MARK:- USER LOGIN, SIGNUP AND LOGOUT RELATED METHODS23 24 func user_signIn_apiCall(_ apiParams: NSDictionary, success:@escaping (_ userData: User) ->(), failure:@escaping (_ error: NSError) ->()) {25 26 sharedAPIClient.baseApiCallWith_HttpHeader(API_LOGIN, method: .post, apiParameters: apiParams, loadingViewText: LOGIN_POPUP_TEXT, baseSuccessBlock: { (responseObject: DataResponse) -> () in27 28 self.update_user_authToken(responseObject.response!)29 30 let emptyDataError: NSError = getFailureError(["error": "empty error."])31 guard let responseDictionary: NSDictionary = responseObject.result.value as? NSDictionary else{32 failure(emptyDataError)33 return34 }35 let userData = Mapper<User>().map(JSONObject: responseDictionary["user"])36 if let user_name = userData?.name{37 name = user_name38 }39 if let user_phone = userData?.phone{40 phone = user_phone41 }42 if let user_id = userData?.id{43 id = user_id44 }45 if let email = userData?.email{46 user_email = email47 }48 if let user_address = userData?.address_response{49 address = user_address50 }51 success(userData!)52 53 }, baseFailureBlock:{ (error: NSError?) -> () in54 failure(error!)55 })56 }57 58 func user_signUp_apiCall(_ apiParams: NSDictionary, success:@escaping (_ responseDictionary: NSDictionary) ->(), failure:@escaping (_ error: NSError) ->()) {59 60 sharedAPIClient.baseApiCallWith_HttpHeader(API_SIGNUP, method: .post, apiParameters: apiParams, loadingViewText: SIGNUP_POPUP_TEXT, baseSuccessBlock: { (responseObject: DataResponse) -> () in61 self.update_user_authToken(responseObject.response!)62 63 let emptyDataError: NSError = getFailureError(["error": "User already exist."])64 guard let responseDictionary: NSDictionary = responseObject.result.value as? NSDictionary else{65 failure(emptyDataError)66 return67 }68 69 let userData = Mapper<User>().map(JSONObject: responseDictionary["user"])70 if let user_name = userData?.name{71 name = user_name72 }73 if let user_phone = userData?.phone{74 phone = user_phone75 }76 if let user_id = userData?.id{77 id = user_id78 }79 if let email = userData?.email{80 user_email = email81 }82 if let user_address = userData?.address_response{83 address = user_address84 }85 success(responseDictionary)86 87 }, baseFailureBlock:{ (error: NSError?) -> () in88 failure(error!)89 })90 }91 92 func user_signOut_apiCall( success:@escaping (_ responseDictionary: NSDictionary) ->(), failure:@escaping (_ error: NSError) ->()) {93 94 sharedAPIClient.baseApiCallWith_HttpHeader(API_LOGOUT, method: .delete, apiParameters: emptyParams, loadingViewText: LOGOUT_POPUP_TEXT, baseSuccessBlock: { (responseObject: DataResponse) -> () in95 96 let emptyDataError: NSError = getFailureError(["error": "empty error."])97 guard let responseDictionary: NSDictionary = responseObject.result.value as? NSDictionary else{98 failure(emptyDataError)99 return100 }101 guard let isSuccess: Int = responseDictionary["success"] as? Int, isSuccess == 1 else{102 failure(emptyDataError)103 return104 }105 success(responseDictionary)106 107 }, baseFailureBlock:{ (error: NSError?) -> () in108 failure(error!)109 })110 }111 112 func user_forgotPassword_apiCall(_ apiParams: NSDictionary, success:@escaping (_ responseDictionary: NSDictionary) ->(), failure:@escaping (_ error: NSError) ->()) {113 114 sharedAPIClient.baseApiCallWith_HttpHeader(API_FORGOTPWD, method: .post, apiParameters: apiParams, loadingViewText: LOADING_POPUP_TEXT, baseSuccessBlock: { (responseObject: DataResponse) -> () in115 116 let emptyDataError: NSError = getFailureError(["error": "empty error."])117 guard let responseDictionary: NSDictionary = responseObject.result.value as? NSDictionary else{118 failure(emptyDataError)119 return120 }121 guard let isSuccess: Int = responseDictionary["success"] as? Int, isSuccess == 1 else{122 failure(emptyDataError)123 return124 }125 success(responseDictionary)126 127 }, baseFailureBlock:{ (error: NSError?) -> () in128 failure(error!)129 })130 }131 132 func user_updatePassword_apiCall(_ apiParams: NSDictionary, success:@escaping (_ responseDictionary: NSDictionary) ->(), failure:@escaping (_ error: NSError) ->()) {133 134 sharedAPIClient.baseApiCallWith_HttpHeader(API_CHANGEPWD, method: .put, apiParameters: apiParams, loadingViewText: UPDATE_PASSWORD_POPUP_TEXT, baseSuccessBlock: { (responseObject: DataResponse) -> () in135 136 let emptyDataError: NSError = getFailureError(["error": "empty error."])137 guard let responseDictionary: NSDictionary = responseObject.result.value as? NSDictionary else{138 failure(emptyDataError)139 return140 }141 guard let isSuccess: Int = responseDictionary["success"] as? Int, isSuccess == 1 else{142 failure(emptyDataError)143 return144 }145 success(responseDictionary)146 147 }, baseFailureBlock:{ (error: NSError?) -> () in148 failure(error!)149 })150 }151 152 func user_updateProfile_apiCall(_ apiParams: NSDictionary, success:@escaping (_ responseDictionary: NSDictionary) ->(), failure:@escaping (_ error: NSError) ->()) {153 154 sharedAPIClient.baseApiCallWith_HttpHeader(API_UPDATEPROFILE, method: .put, apiParameters: apiParams, loadingViewText: UPDATE_PASSWORD_POPUP_TEXT, baseSuccessBlock: { (responseObject: DataResponse) -> () in155 156 let emptyDataError: NSError = getFailureError(["error": "empty error."])157 guard let responseDictionary: NSDictionary = responseObject.result.value as? NSDictionary else{158 failure(emptyDataError)159 return160 }161 guard let isSuccess: Int = responseDictionary["success"] as? Int, isSuccess == 1 else{162 failure(emptyDataError)163 return164 }165 success(responseDictionary)166 167 }, baseFailureBlock:{ (error: NSError?) -> () in168 failure(error!)169 })170 }171 172 func user_Profile_apiCall(_ apiParams: NSDictionary, success:@escaping (_ responseDictionary: User) ->(), failure:@escaping (_ error: NSError) ->()) {173 174 sharedAPIClient.baseApiCallWith_HttpHeader(API_PROFILE, method: .get, apiParameters: apiParams, loadingViewText: LOADING_POPUP_TEXT, baseSuccessBlock: { (responseObject: DataResponse) -> () in175 176 let emptyDataError: NSError = getFailureError(["error": "empty error."])177 guard let responseDictionary: NSDictionary = responseObject.result.value as? NSDictionary else{178 failure(emptyDataError)179 return180 }181 182 if let userResponse: User = Mapper<User>().map(JSONObject: responseDictionary["data"]){183 success(userResponse)184 }185 186 }, baseFailureBlock:{ (error: NSError?) -> () in187 failure(error!)188 })189 }190 191 //MARK:- PROPERTY_RELATED_API'S192 193 func user_dashboard_apiCall( success:@escaping (_ responseDictionary: DashboardResponse) ->(), failure:@escaping (_ error: NSError) ->()) {194 195 sharedAPIClient.baseApiCallWith_HttpHeader(API_DASHBOARD, method: .get, apiParameters: emptyParams, loadingViewText: LOADING_POPUP_TEXT, baseSuccessBlock: { (responseObject: DataResponse) -> () in196 197 let emptyDataError: NSError = getFailureError(["error": "empty error."])198 guard let responseDictionary: NSDictionary = responseObject.result.value as? NSDictionary else{199 failure(emptyDataError)200 return201 }202 203 if let dashboardResponse: DashboardResponse = Mapper<DashboardResponse>().map(JSONObject: responseDictionary){204 success(dashboardResponse)205 }206 207 }, baseFailureBlock:{ (error: NSError?) -> () in208 failure(error!)209 })210 }211 212 func user_addListing_apiCall(_ apiParams: NSDictionary, success:@escaping (_ responseDictionary: NSDictionary) ->(), failure:@escaping (_ error: NSError) ->()) {213 214 sharedAPIClient.baseApiCallWith_HttpHeader(API_ADDLISTING, method: .post, apiParameters: apiParams, loadingViewText: ADD_LISTING_POPUP_TEXT, baseSuccessBlock: { (responseObject: DataResponse) -> () in215 216 let emptyDataError: NSError = getFailureError(["error": "empty error."])217 guard let responseDictionary: NSDictionary = responseObject.result.value as? NSDictionary else{218 failure(emptyDataError)219 return220 }221 222 success(responseDictionary)223 224 }, baseFailureBlock:{ (error: NSError?) -> () in225 failure(error!)226 })227 }228 229 // Update user auth token230 func update_user_authToken(_ response: HTTPURLResponse) {231 if let token: String = response.allHeaderFields["X-Auth-Token"] as? String {232 auth_token = token233 }234 }235 236}...

Full Screen

Full Screen

adodb-error.inc.php

Source:adodb-error.inc.php Github

copy

Full Screen

1<?php 2/** 3 * @version V4.90 8 June 2006 (c) 2000-2006 John Lim (jlim#natsoft.com.my). All rights reserved. 4 * Released under both BSD license and Lesser GPL library license. 5 * Whenever there is any discrepancy between the two licenses, 6 * the BSD license will take precedence. 7 * 8 * Set tabs to 4 for best viewing. 9 * 10 * The following code is adapted from the PEAR DB error handling code. 11 * Portions (c)1997-2002 The PHP Group. 12 */ 13 14 15if (!defined("DB_ERROR")) define("DB_ERROR",-1); 16 17if (!defined("DB_ERROR_SYNTAX")) { 18 define("DB_ERROR_SYNTAX", -2); 19 define("DB_ERROR_CONSTRAINT", -3); 20 define("DB_ERROR_NOT_FOUND", -4); 21 define("DB_ERROR_ALREADY_EXISTS", -5); 22 define("DB_ERROR_UNSUPPORTED", -6); 23 define("DB_ERROR_MISMATCH", -7); 24 define("DB_ERROR_INVALID", -8); 25 define("DB_ERROR_NOT_CAPABLE", -9); 26 define("DB_ERROR_TRUNCATED", -10); 27 define("DB_ERROR_INVALID_NUMBER", -11); 28 define("DB_ERROR_INVALID_DATE", -12); 29 define("DB_ERROR_DIVZERO", -13); 30 define("DB_ERROR_NODBSELECTED", -14); 31 define("DB_ERROR_CANNOT_CREATE", -15); 32 define("DB_ERROR_CANNOT_DELETE", -16); 33 define("DB_ERROR_CANNOT_DROP", -17); 34 define("DB_ERROR_NOSUCHTABLE", -18); 35 define("DB_ERROR_NOSUCHFIELD", -19); 36 define("DB_ERROR_NEED_MORE_DATA", -20); 37 define("DB_ERROR_NOT_LOCKED", -21); 38 define("DB_ERROR_VALUE_COUNT_ON_ROW", -22); 39 define("DB_ERROR_INVALID_DSN", -23); 40 define("DB_ERROR_CONNECT_FAILED", -24); 41 define("DB_ERROR_EXTENSION_NOT_FOUND",-25); 42 define("DB_ERROR_NOSUCHDB", -25); 43 define("DB_ERROR_ACCESS_VIOLATION", -26); 44} 45 46function adodb_errormsg($value) 47{ 48global $ADODB_LANG,$ADODB_LANG_ARRAY; 49 50 if (empty($ADODB_LANG)) $ADODB_LANG = 'en'; 51 if (isset($ADODB_LANG_ARRAY['LANG']) && $ADODB_LANG_ARRAY['LANG'] == $ADODB_LANG) ; 52 else { 53 include_once(ADODB_DIR."/lang/adodb-$ADODB_LANG.inc.php"); 54 } 55 return isset($ADODB_LANG_ARRAY[$value]) ? $ADODB_LANG_ARRAY[$value] : $ADODB_LANG_ARRAY[DB_ERROR]; 56} 57 58function adodb_error($provider,$dbType,$errno) 59{ 60 //var_dump($errno); 61 if (is_numeric($errno) && $errno == 0) return 0; 62 switch($provider) { 63 case 'mysql': $map = adodb_error_mysql(); break; 64 65 case 'oracle': 66 case 'oci8': $map = adodb_error_oci8(); break; 67 68 case 'ibase': $map = adodb_error_ibase(); break; 69 70 case 'odbc': $map = adodb_error_odbc(); break; 71 72 case 'mssql': 73 case 'sybase': $map = adodb_error_mssql(); break; 74 75 case 'informix': $map = adodb_error_ifx(); break; 76 77 case 'postgres': return adodb_error_pg($errno); break; 78 79 case 'sqlite': return $map = adodb_error_sqlite(); break; 80 default: 81 return DB_ERROR; 82 } 83 //print_r($map); 84 //var_dump($errno); 85 if (isset($map[$errno])) return $map[$errno]; 86 return DB_ERROR; 87} 88 89//************************************************************************************** 90 91function adodb_error_pg($errormsg) 92{ 93 if (is_numeric($errormsg)) return (integer) $errormsg; 94 static $error_regexps = array( 95 '/(Table does not exist\.|Relation [\"\'].*[\"\'] does not exist|sequence does not exist|class ".+" not found)$/' => DB_ERROR_NOSUCHTABLE, 96 '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*/' => DB_ERROR_ALREADY_EXISTS, 97 '/divide by zero$/' => DB_ERROR_DIVZERO, 98 '/pg_atoi: error in .*: can\'t parse /' => DB_ERROR_INVALID_NUMBER, 99 '/ttribute [\"\'].*[\"\'] not found|Relation [\"\'].*[\"\'] does not have attribute [\"\'].*[\"\']/' => DB_ERROR_NOSUCHFIELD, 100 '/parser: parse error at or near \"/' => DB_ERROR_SYNTAX, 101 '/referential integrity violation/' => DB_ERROR_CONSTRAINT, 102 '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*|duplicate key violates unique constraint/' 103 => DB_ERROR_ALREADY_EXISTS 104 ); 105 reset($error_regexps); 106 while (list($regexp,$code) = each($error_regexps)) { 107 if (preg_match($regexp, $errormsg)) { 108 return $code; 109 } 110 } 111 // Fall back to DB_ERROR if there was no mapping. 112 return DB_ERROR; 113} 114 115function adodb_error_odbc() 116{ 117static $MAP = array( 118 '01004' => DB_ERROR_TRUNCATED, 119 '07001' => DB_ERROR_MISMATCH, 120 '21S01' => DB_ERROR_MISMATCH, 121 '21S02' => DB_ERROR_MISMATCH, 122 '22003' => DB_ERROR_INVALID_NUMBER, 123 '22008' => DB_ERROR_INVALID_DATE, 124 '22012' => DB_ERROR_DIVZERO, 125 '23000' => DB_ERROR_CONSTRAINT, 126 '24000' => DB_ERROR_INVALID, 127 '34000' => DB_ERROR_INVALID, 128 '37000' => DB_ERROR_SYNTAX, 129 '42000' => DB_ERROR_SYNTAX, 130 'IM001' => DB_ERROR_UNSUPPORTED, 131 'S0000' => DB_ERROR_NOSUCHTABLE, 132 'S0001' => DB_ERROR_NOT_FOUND, 133 'S0002' => DB_ERROR_NOSUCHTABLE, 134 'S0011' => DB_ERROR_ALREADY_EXISTS, 135 'S0012' => DB_ERROR_NOT_FOUND, 136 'S0021' => DB_ERROR_ALREADY_EXISTS, 137 'S0022' => DB_ERROR_NOT_FOUND, 138 'S1000' => DB_ERROR_NOSUCHTABLE, 139 'S1009' => DB_ERROR_INVALID, 140 'S1090' => DB_ERROR_INVALID, 141 'S1C00' => DB_ERROR_NOT_CAPABLE 142 ); 143 return $MAP; 144} 145 146function adodb_error_ibase() 147{ 148static $MAP = array( 149 -104 => DB_ERROR_SYNTAX, 150 -150 => DB_ERROR_ACCESS_VIOLATION, 151 -151 => DB_ERROR_ACCESS_VIOLATION, 152 -155 => DB_ERROR_NOSUCHTABLE, 153 -157 => DB_ERROR_NOSUCHFIELD, 154 -158 => DB_ERROR_VALUE_COUNT_ON_ROW, 155 -170 => DB_ERROR_MISMATCH, 156 -171 => DB_ERROR_MISMATCH, 157 -172 => DB_ERROR_INVALID, 158 -204 => DB_ERROR_INVALID, 159 -205 => DB_ERROR_NOSUCHFIELD, 160 -206 => DB_ERROR_NOSUCHFIELD, 161 -208 => DB_ERROR_INVALID, 162 -219 => DB_ERROR_NOSUCHTABLE, 163 -297 => DB_ERROR_CONSTRAINT, 164 -530 => DB_ERROR_CONSTRAINT, 165 -803 => DB_ERROR_CONSTRAINT, 166 -551 => DB_ERROR_ACCESS_VIOLATION, 167 -552 => DB_ERROR_ACCESS_VIOLATION, 168 -922 => DB_ERROR_NOSUCHDB, 169 -923 => DB_ERROR_CONNECT_FAILED, 170 -924 => DB_ERROR_CONNECT_FAILED 171 ); 172 173 return $MAP; 174} 175 176function adodb_error_ifx() 177{ 178static $MAP = array( 179 '-201' => DB_ERROR_SYNTAX, 180 '-206' => DB_ERROR_NOSUCHTABLE, 181 '-217' => DB_ERROR_NOSUCHFIELD, 182 '-329' => DB_ERROR_NODBSELECTED, 183 '-1204' => DB_ERROR_INVALID_DATE, 184 '-1205' => DB_ERROR_INVALID_DATE, 185 '-1206' => DB_ERROR_INVALID_DATE, 186 '-1209' => DB_ERROR_INVALID_DATE, 187 '-1210' => DB_ERROR_INVALID_DATE, 188 '-1212' => DB_ERROR_INVALID_DATE 189 ); 190 191 return $MAP; 192} 193 194function adodb_error_oci8() 195{ 196static $MAP = array( 197 1 => DB_ERROR_ALREADY_EXISTS, 198 900 => DB_ERROR_SYNTAX, 199 904 => DB_ERROR_NOSUCHFIELD, 200 923 => DB_ERROR_SYNTAX, 201 942 => DB_ERROR_NOSUCHTABLE, 202 955 => DB_ERROR_ALREADY_EXISTS, 203 1476 => DB_ERROR_DIVZERO, 204 1722 => DB_ERROR_INVALID_NUMBER, 205 2289 => DB_ERROR_NOSUCHTABLE, 206 2291 => DB_ERROR_CONSTRAINT, 207 2449 => DB_ERROR_CONSTRAINT 208 ); 209 210 return $MAP; 211} 212 213function adodb_error_mssql() 214{ 215static $MAP = array( 216 208 => DB_ERROR_NOSUCHTABLE, 217 2601 => DB_ERROR_ALREADY_EXISTS 218 ); 219 220 return $MAP; 221} 222 223function adodb_error_sqlite() 224{ 225static $MAP = array( 226 1 => DB_ERROR_SYNTAX 227 ); 228 229 return $MAP; 230} 231 232function adodb_error_mysql() 233{ 234static $MAP = array( 235 1004 => DB_ERROR_CANNOT_CREATE, 236 1005 => DB_ERROR_CANNOT_CREATE, 237 1006 => DB_ERROR_CANNOT_CREATE, 238 1007 => DB_ERROR_ALREADY_EXISTS, 239 1008 => DB_ERROR_CANNOT_DROP, 240 1045 => DB_ERROR_ACCESS_VIOLATION, 241 1046 => DB_ERROR_NODBSELECTED, 242 1049 => DB_ERROR_NOSUCHDB, 243 1050 => DB_ERROR_ALREADY_EXISTS, 244 1051 => DB_ERROR_NOSUCHTABLE, 245 1054 => DB_ERROR_NOSUCHFIELD, 246 1062 => DB_ERROR_ALREADY_EXISTS, 247 1064 => DB_ERROR_SYNTAX, 248 1100 => DB_ERROR_NOT_LOCKED, 249 1136 => DB_ERROR_VALUE_COUNT_ON_ROW, 250 1146 => DB_ERROR_NOSUCHTABLE, 251 1048 => DB_ERROR_CONSTRAINT, 252 2002 => DB_ERROR_CONNECT_FAILED, 253 2005 => DB_ERROR_CONNECT_FAILED 254 ); 255 256 return $MAP; 257} ...

Full Screen

Full Screen

CatchableTests.swift

Source:CatchableTests.swift Github

copy

Full Screen

...3import XCTest4class CatchableTests: XCTestCase {5 func testFinally() {6 let finallyQueue = DispatchQueue(label: "\(#file):\(#line)", attributes: .concurrent)7 func helper(error: Error, on queue: DispatchQueue = .main, flags: DispatchWorkItemFlags? = nil) {8 let ex = (expectation(description: ""), expectation(description: ""))9 var x = 010 Promise<Void>(error: error).catch(policy: .allErrors) { _ in11 XCTAssertEqual(x, 0)12 x += 113 ex.0.fulfill()14 }.finally(on: queue, flags: flags) {15 if let flags = flags, flags.contains(.barrier) {16 dispatchPrecondition(condition: .onQueueAsBarrier(queue))17 } else {18 dispatchPrecondition(condition: .onQueue(queue))19 }20 XCTAssertEqual(x, 1)21 x += 122 ex.1.fulfill()23 }24 wait(for: [ex.0, ex.1], timeout: 10)25 }26 helper(error: Error.dummy)27 helper(error: Error.cancelled)28 helper(error: Error.dummy, on: finallyQueue)29 helper(error: Error.dummy, on: finallyQueue, flags: .barrier)30 }31 func testCauterize() {32 let ex = expectation(description: "")33 let p = Promise<Void>(error: Error.dummy)34 // cannot test specifically that this outputs to console,35 // but code-coverage will note that the line is run36 p.cauterize()37 p.catch { _ in38 ex.fulfill()39 }40 wait(for: [ex], timeout: 1)41 }42}43/// `Promise<Void>.recover`44extension CatchableTests {45 func test__void_specialized_full_recover() {46 func helper(error: Swift.Error) {47 let ex = expectation(description: "")48 Promise<Void>(error: error).recover { _ in }.done(ex.fulfill)49 wait(for: [ex], timeout: 10)50 }51 helper(error: Error.dummy)52 helper(error: Error.cancelled)53 }54 func test__void_specialized_full_recover__fulfilled_path() {55 let ex = expectation(description: "")56 Promise().recover { _ in XCTFail() }.done(ex.fulfill)57 wait(for: [ex], timeout: 10)58 }59 func test__void_specialized_conditional_recover() {60 func helper(policy: CatchPolicy, error: Swift.Error, line: UInt = #line) {61 let ex = expectation(description: "")62 var x = 063 Promise<Void>(error: error).recover(policy: policy) { err in64 guard x < 1 else { throw err }65 x += 166 }.done(ex.fulfill).silenceWarning()67 wait(for: [ex], timeout: 10)68 }69 for error in [Error.dummy as Swift.Error, Error.cancelled] {70 helper(policy: .allErrors, error: error)71 }72 helper(policy: .allErrorsExceptCancellation, error: Error.dummy)73 }74 func test__void_specialized_conditional_recover__no_recover() {75 func helper(policy: CatchPolicy, error: Error, line: UInt = #line) {76 let ex = expectation(description: "")77 Promise<Void>(error: error).recover(policy: policy) { err in78 throw err79 }.catch(policy: .allErrors) {80 XCTAssertEqual(error, $0 as? Error)81 ex.fulfill()82 }83 wait(for: [ex], timeout: 10)84 }85 for error in [Error.dummy, Error.cancelled] {86 helper(policy: .allErrors, error: error)87 }88 helper(policy: .allErrorsExceptCancellation, error: Error.dummy)89 }90 func test__void_specialized_conditional_recover__ignores_cancellation_but_fed_cancellation() {91 let ex = expectation(description: "")92 Promise<Void>(error: Error.cancelled).recover(policy: .allErrorsExceptCancellation) { _ in93 XCTFail()94 }.catch(policy: .allErrors) {95 XCTAssertEqual(Error.cancelled, $0 as? Error)96 ex.fulfill()97 }98 wait(for: [ex], timeout: 10)99 }100 func test__void_specialized_conditional_recover__fulfilled_path() {101 let ex = expectation(description: "")102 Promise().recover { _ in103 XCTFail()104 }.catch { _ in105 XCTFail() // this `catch` to ensure we are calling the `recover` variant we think we are106 }.finally {107 ex.fulfill()108 }109 wait(for: [ex], timeout: 10)110 }111}112/// `Promise<T>.recover`113extension CatchableTests {114 func test__full_recover() {115 func helper(error: Swift.Error) {116 let ex = expectation(description: "")117 Promise<Int>(error: error).recover { _ in return .value(2) }.done {118 XCTAssertEqual($0, 2)119 ex.fulfill()120 }121 wait(for: [ex], timeout: 10)122 }123 helper(error: Error.dummy)124 helper(error: Error.cancelled)125 }126 func test__full_recover__fulfilled_path() {127 let ex = expectation(description: "")128 Promise.value(1).recover { _ in XCTFail(); return .value(2) }.done{129 XCTAssertEqual($0, 1)130 ex.fulfill()131 }132 wait(for: [ex], timeout: 10)133 }134 func test__conditional_recover() {135 func helper(policy: CatchPolicy, error: Swift.Error, line: UInt = #line) {136 let ex = expectation(description: "")137 var x = 0138 Promise<Int>(error: error).recover(policy: policy) { err -> Promise<Int> in139 guard x < 1 else { throw err }140 x += 1141 return .value(x)142 }.done {143 XCTAssertEqual($0, x)144 ex.fulfill()145 }.silenceWarning()146 wait(for: [ex], timeout: 10)147 }148 for error in [Error.dummy as Swift.Error, Error.cancelled] {149 helper(policy: .allErrors, error: error)150 }151 helper(policy: .allErrorsExceptCancellation, error: Error.dummy)152 }153 func test__conditional_recover__no_recover() {154 func helper(policy: CatchPolicy, error: Error, line: UInt = #line) {155 let ex = expectation(description: "")156 Promise<Int>(error: error).recover(policy: policy) { err -> Promise<Int> in157 throw err158 }.catch(policy: .allErrors) {159 XCTAssertEqual(error, $0 as? Error)160 ex.fulfill()161 }162 wait(for: [ex], timeout: 10)163 }164 for error in [Error.dummy, Error.cancelled] {165 helper(policy: .allErrors, error: error)166 }167 helper(policy: .allErrorsExceptCancellation, error: Error.dummy)168 }169 func test__conditional_recover__ignores_cancellation_but_fed_cancellation() {170 let ex = expectation(description: "")171 Promise<Int>(error: Error.cancelled).recover(policy: .allErrorsExceptCancellation) { _ -> Promise<Int> in172 XCTFail()173 return .value(1)174 }.catch(policy: .allErrors) {175 XCTAssertEqual(Error.cancelled, $0 as? Error)176 ex.fulfill()177 }178 wait(for: [ex], timeout: 10)179 }180 func test__conditional_recover__fulfilled_path() {181 let ex = expectation(description: "")182 Promise.value(1).recover { err -> Promise<Int> in183 XCTFail()184 throw err185 }.done {186 XCTAssertEqual($0, 1)187 ex.fulfill()188 }.catch { _ in189 XCTFail() // this `catch` to ensure we are calling the `recover` variant we think we are190 }191 wait(for: [ex], timeout: 10)192 }193 func testEnsureThen_Error() {194 let ex = expectation(description: "")195 Promise.value(1).done {196 XCTAssertEqual($0, 1)197 throw Error.dummy198 }.ensureThen {199 after(seconds: 0.01)200 }.catch {201 XCTAssertEqual(Error.dummy, $0 as? Error)202 }.finally {203 ex.fulfill()204 }205 wait(for: [ex], timeout: 10)206 }207 func testEnsureThen_Value() {208 let ex = expectation(description: "")209 Promise.value(1).ensureThen {210 after(seconds: 0.01)211 }.done {212 XCTAssertEqual($0, 1)213 }.catch { _ in214 XCTFail()215 }.finally {216 ex.fulfill()217 }218 wait(for: [ex], timeout: 10)219 }220}221private enum Error: CancellableError {222 case dummy223 case cancelled224 var isCancelled: Bool {225 return self == Error.cancelled226 }227}...

Full Screen

Full Screen

Resolver.swift

Source:Resolver.swift Github

copy

Full Screen

...15 func fulfill(_ value: T) {16 box.seal(.fulfilled(value))17 }18 /// Rejects the promise with the provided error19 func reject(_ error: Error) {20 box.seal(.rejected(error))21 }22 /// Resolves the promise with the provided result23 func resolve(_ result: Result<T>) {24 box.seal(result)25 }26 /// Resolves the promise with the provided value or error27 func resolve(_ obj: T?, _ error: Error?) {28 if let error = error {29 reject(error)30 } else if let obj = obj {31 fulfill(obj)32 } else {33 reject(PMKError.invalidCallingConvention)34 }35 }36 /// Fulfills the promise with the provided value unless the provided error is non-nil37 func resolve(_ obj: T, _ error: Error?) {38 if let error = error {39 reject(error)40 } else {41 fulfill(obj)42 }43 }44 /// Resolves the promise, provided for non-conventional value-error ordered completion handlers.45 func resolve(_ error: Error?, _ obj: T?) {46 resolve(obj, error)47 }48}49#if swift(>=3.1)50extension Resolver where T == Void {51 /// Fulfills the promise unless error is non-nil52 public func resolve(_ error: Error?) {53 if let error = error {54 reject(error)55 } else {56 fulfill(())57 }58 }59#if false60 // disabled ∵ https://github.com/mxcl/PromiseKit/issues/99061 /// Fulfills the promise62 public func fulfill() {63 self.fulfill(())64 }65#else66 /// Fulfills the promise67 /// - Note: underscore is present due to: https://github.com/mxcl/PromiseKit/issues/99068 public func fulfill_() {69 self.fulfill(())70 }71#endif72}73#endif74public enum Result<T> {75 case fulfilled(T)76 case rejected(Error)77}78public extension PromiseKit.Result {79 var isFulfilled: Bool {80 switch self {81 case .fulfilled:82 return true83 case .rejected:84 return false85 }86 }87}...

Full Screen

Full Screen

Error

Using AI Code Generation

copy

Full Screen

1import Nimble2import Quick3class QuickSpecTest: QuickSpec {4 override func spec() {5 describe("QuickSpecTest") {6 it("should pass") {7 expect(1).to(equal(1))8 }9 }10 }11}12import XCTest13import Nimble14class XCTestTest: XCTestCase {15 func testExample() {16 expect(1).to(equal(1))17 }18}19import XCTest20import Nimble21class XCTestTest: XCTestCase {22 func testExample() {23 expect(1).to(equal(1))24 }25}26import XCTest27import Nimble28class XCTestTest: XCTestCase {29 func testExample() {30 expect(1).to(equal(1))31 }32}33import XCTest34import Nimble35class XCTestTest: XCTestCase {36 func testExample() {37 expect(1).to(equal(1))38 }39}40import XCTest41import Nimble42class XCTestTest: XCTestCase {43 func testExample() {44 expect(1).to(equal(1))45 }46}47import XCTest48import Nimble49class XCTestTest: XCTestCase {50 func testExample() {51 expect(1).to(equal(1))52 }53}54import XCTest55import Nimble56class XCTestTest: XCTestCase {57 func testExample() {58 expect(1).to(equal(1))59 }60}61import XCTest62import Nimble63class XCTestTest: XCTestCase {64 func testExample() {65 expect(1).to(equal(1))66 }67}68import XCTest69import Nimble70class XCTestTest: XCTestCase {71 func testExample() {72 expect(1).to(equal(1))73 }74}

Full Screen

Full Screen

Error

Using AI Code Generation

copy

Full Screen

1import Nimble2import Quick3import XCTest4class FirstTest: QuickSpec {5 override func spec() {6 describe("FirstTest") {7 it("should pass") {8 expect(true).to(beTrue())9 }10 }11 }12}13import Nimble14import Quick15import XCTest16class SecondTest: QuickSpec {17 override func spec() {18 describe("SecondTest") {19 it("should pass") {20 expect(true).to(beTrue())21 }22 }23 }24}

Full Screen

Full Screen

Error

Using AI Code Generation

copy

Full Screen

1import Nimble2import XCTest3class MyTest: XCTestCase {4 func testError() {5 expect { throw NSError(domain: "Test", code: 0, userInfo: nil) }.to(throwError())6 }7}8import XCTest9class MyTest: XCTestCase {10 func testError() {11 expect { throw NSError(domain: "Test", code: 0, userInfo: nil) }.to(throwError())12 }13}14import Quick15import Nimble16class MyTest: QuickSpec {17 override func spec() {18 it("test") {19 expect { throw NSError(domain: "Test", code: 0, userInfo: nil) }.to(throwError())20 }21 }22}23import Quick24import XCTest25class MyTest: QuickSpec {26 override func spec() {27 it("test") {28 expect { throw NSError(domain: "Test", code: 0, userInfo: nil) }.to(throwError())29 }30 }31}

Full Screen

Full Screen

Error

Using AI Code Generation

copy

Full Screen

1import Nimble2import Quick3import XCTest4class NimbleErrorSpec: QuickSpec {5 override func spec() {6 describe("NimbleError") {7 it("can be constructed with a message") {8 let error = NimbleError(message: "message")9 expect(error.message).to(equal("message"))10 }11 }12 }13}14import Quick15import Nimble16import XCTest17class QuickErrorSpec: QuickSpec {18 override func spec() {19 describe("QuickError") {20 it("can be constructed with a message") {21 let error = QuickError(message: "message")22 expect(error.message).to(equal("message"))23 }24 }25 }26}27import Quick28import Nimble29import XCTest30class QuickErrorSpec: QuickSpec {31 override func spec() {32 describe("QuickError") {33 it("can be constructed with a message") {34 let error = QuickError(message: "message")35 expect(error.message).to(equal("message"))36 }37 }38 }39}40import Quick41import Nimble42import XCTest43class QuickErrorSpec: QuickSpec {44 override func spec() {45 describe("QuickError") {46 it("can be constructed with a message") {47 let error = QuickError(message: "message")48 expect(error.message).to(equal("message"))49 }50 }51 }52}53import Quick54import Nimble55import XCTest56class QuickErrorSpec: QuickSpec {57 override func spec() {58 describe("QuickError") {59 it("can be constructed with a message") {60 let error = QuickError(message: "message")61 expect(error.message).to(equal("message"))62 }63 }64 }65}66import Quick67import Nimble68import XCTest69class QuickErrorSpec: QuickSpec {70 override func spec() {71 describe("QuickError") {72 it("can be constructed with a message") {73 let error = QuickError(message: "message")74 expect(error.message).to(equal("message"))

Full Screen

Full Screen

Error

Using AI Code Generation

copy

Full Screen

1import Nimble2import Quick3import RxSwift4import RxBlocking5import RxTest6import XCTest7class Test1: QuickSpec {8 override func spec() {9 describe("Test1") {10 it("test1") {11 expect(1).to(equal(1))12 }13 }14 }15}16import Nimble17import Quick18import RxSwift19import RxBlocking20import RxTest21import XCTest22class Test2: QuickSpec {23 override func spec() {24 describe("Test2") {25 it("test2") {26 expect(1).to(equal(1))27 }28 }29 }30}31import Nimble32import Quick33import RxSwift34import RxBlocking35import RxTest36import XCTest37class Test3: QuickSpec {38 override func spec() {39 describe("Test3") {40 it("test3") {41 expect(1).to(equal(1))42 }43 }44 }45}46import Nimble47import Quick48import RxSwift49import RxBlocking50import RxTest51import XCTest52class Test4: QuickSpec {53 override func spec() {54 describe("Test4") {55 it("test4") {56 expect(1).to(equal(1))57 }58 }59 }60}61import Nimble62import Quick63import RxSwift64import RxBlocking65import RxTest66import XCTest67class Test5: QuickSpec {68 override func spec() {69 describe("Test5") {70 it("test5") {71 expect(1).to(equal(1))72 }73 }74 }75}76import Nimble77import Quick78import RxSwift79import RxBlocking80import RxTest81import XCTest82class Test6: QuickSpec {83 override func spec() {84 describe("Test6") {85 it("test6") {86 expect(1).to(equal(1))87 }88 }89 }90}

Full Screen

Full Screen

Error

Using AI Code Generation

copy

Full Screen

1import Nimble2func test() throws {3 throw Error(message: "test")4}5import XCTest6func test() throws {7 throw Error(message: "test")8}9func test() throws {10 throw Error(message: "test")11}12func test() throws {13 throw Error(message: "test")14}15func test() throws {16 throw Error(message: "test")17}18func test() throws {19 throw Error(message: "test")20}21func test() throws {22 throw Error(message: "test")23}24func test() throws {25 throw Error(message: "test")26}27func test() throws {28 throw Error(message: "test")29}30func test() throws {31 throw Error(message: "test")32}33func test() throws {34 throw Error(message: "test")35}36func test() throws {37 throw Error(message: "test")38}39func test() throws {40 throw Error(message: "test")41}42func test() throws {43 throw Error(message: "test")44}45func test() throws {46 throw Error(message: "test")47}48func test() throws {49 throw Error(message: "

Full Screen

Full Screen

Error

Using AI Code Generation

copy

Full Screen

1import Nimble2import Quick3class ErrorClass: QuickSpec {4 override func spec() {5 describe("Error") {6 context("Equatable") {7 it("can be compared with == operator") {8 let error = NSError(domain: "com.example", code: 0, userInfo: nil)9 expect(error) == error10 }11 }12 }13 }14}15import Nimble16import Quick17class ErrorClass: QuickSpec {18 override func spec() {19 describe("Error") {20 context("Equatable") {21 it("can be compared with == operator") {22 let error = NSError(domain: "com.example", code: 0, userInfo: nil)23 expect(error) == error24 }25 }26 }27 }28}29import Nimble30import Quick31class ErrorClass: QuickSpec {32 override func spec() {33 describe("Error") {34 context("Equatable") {35 it("can be compared with == operator") {36 let error = NSError(domain: "com.example", code: 0, userInfo: nil)37 expect(error) == error38 }39 }40 }41 }42}43import Nimble44import Quick45class ErrorClass: QuickSpec {46 override func spec() {47 describe("Error") {48 context("Equatable") {49 it("can be compared with == operator") {50 let error = NSError(domain: "com.example", code: 0, userInfo: nil)51 expect(error) == error52 }53 }54 }55 }56}57import Nimble58import Quick59class ErrorClass: QuickSpec {60 override func spec() {61 describe("Error") {62 context("Equatable") {63 it("can be compared with == operator") {64 let error = NSError(domain: "com.example", code: 0, userInfo: nil)65 expect(error) == error66 }67 }68 }69 }70}71import Nimble72import Quick73class ErrorClass: QuickSpec {

Full Screen

Full Screen

Error

Using AI Code Generation

copy

Full Screen

1import Nimble2func test() {3 expect { () -> Void in4 throw Error.error("error")5 }.to(throwError())6}7import Nimble8func test() {9 expect { () -> Void in10 throw Error.error("error")11 }.to(throwError())12}

Full Screen

Full Screen

Error

Using AI Code Generation

copy

Full Screen

1import Nimble2import Quick3class test1: QuickSpec {4 override func spec() {5 describe("Error") {6 it("can be compared to another Error") {7 let error = NSError(domain: "com.example", code: 0, userInfo: nil)8 expect(error).to(equal(error))9 }10 }11 }12}13import XCTest14import Nimble15import Quick16class test2: QuickSpec {17 override func spec() {18 describe("Error") {19 it("can be compared to another Error") {20 let error = NSError(domain: "com.example", code: 0, userInfo: nil)21 expect(error).to(equal(error))22 }23 }24 }25}26import XCTest27import Quick28class test3: QuickSpec {29 override func spec() {30 describe("Error") {31 it("can be compared to another Error") {32 let error = NSError(domain: "com.example", code: 0, userInfo: nil)33 expect(error).to(equal(error))34 }35 }36 }37}38import XCTest39import Quick40class test4: QuickSpec {41 override func spec() {42 describe("Error") {43 it("can be compared to another Error") {44 let error = NSError(domain: "com.example", code: 0, userInfo: nil)45 expect(error).to(equal(error))46 }47 }48 }49}50import XCTest51import Quick52class test5: QuickSpec {53 override func spec() {54 describe("Error") {55 it("can be compared to another Error") {56 let error = NSError(domain: "com.example", code: 0, userInfo: nil)57 expect(error).to(equal(error))58 }59 }60 }61}62import XCTest63import Quick64class test6: QuickSpec {65 override func spec() {66 describe("Error") {67 it("can be compared to another Error") {

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful