IexThrowErrnoExc.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873
  1. ///////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas
  4. // Digital Ltd. LLC
  5. //
  6. // All rights reserved.
  7. //
  8. // Redistribution and use in source and binary forms, with or without
  9. // modification, are permitted provided that the following conditions are
  10. // met:
  11. // * Redistributions of source code must retain the above copyright
  12. // notice, this list of conditions and the following disclaimer.
  13. // * Redistributions in binary form must reproduce the above
  14. // copyright notice, this list of conditions and the following disclaimer
  15. // in the documentation and/or other materials provided with the
  16. // distribution.
  17. // * Neither the name of Industrial Light & Magic nor the names of
  18. // its contributors may be used to endorse or promote products derived
  19. // from this software without specific prior written permission.
  20. //
  21. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  25. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  26. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  27. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  28. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  29. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. //
  33. ///////////////////////////////////////////////////////////////////////////
  34. //----------------------------------------------------------------
  35. //
  36. // Exceptions that correspond to "errno" error codes,
  37. // and a function to make throwing those exceptions easy.
  38. //
  39. //----------------------------------------------------------------
  40. #include "IexThrowErrnoExc.h"
  41. #include "IexErrnoExc.h"
  42. #include <string.h>
  43. #include <errno.h>
  44. #ifdef PLATFORM_WINDOWS
  45. #include <windows.h>
  46. #endif
  47. IEX_INTERNAL_NAMESPACE_SOURCE_ENTER
  48. void throwErrnoExc (const std::string &text, int errnum)
  49. {
  50. #ifdef PLATFORM_WINDOWS
  51. if (0 != getenv("IEXDEBUGTHROW"))
  52. DebugBreak();
  53. #endif
  54. const char *entext = strerror (errnum);
  55. std::string tmp (text);
  56. std::string::size_type pos;
  57. while (std::string::npos != (pos = tmp.find ("%T")))
  58. tmp.replace (pos, 2, entext, strlen (entext));
  59. switch (errnum)
  60. {
  61. #if defined (EPERM)
  62. case EPERM:
  63. throw EpermExc (tmp);
  64. #endif
  65. #if defined (ENOENT)
  66. case ENOENT:
  67. throw EnoentExc (tmp);
  68. #endif
  69. #if defined (ESRCH)
  70. case ESRCH:
  71. throw EsrchExc (tmp);
  72. #endif
  73. #if defined (EINTR)
  74. case EINTR:
  75. throw EintrExc (tmp);
  76. #endif
  77. #if defined (EIO)
  78. case EIO:
  79. throw EioExc (tmp);
  80. #endif
  81. #if defined (ENXIO)
  82. case ENXIO:
  83. throw EnxioExc (tmp);
  84. #endif
  85. #if defined (E2BIG)
  86. case E2BIG:
  87. throw E2bigExc (tmp);
  88. #endif
  89. #if defined (ENOEXEC)
  90. case ENOEXEC:
  91. throw EnoexecExc (tmp);
  92. #endif
  93. #if defined (EBADF)
  94. case EBADF:
  95. throw EbadfExc (tmp);
  96. #endif
  97. #if defined (ECHILD)
  98. case ECHILD:
  99. throw EchildExc (tmp);
  100. #endif
  101. #if defined (EAGAIN)
  102. case EAGAIN:
  103. throw EagainExc (tmp);
  104. #endif
  105. #if defined (ENOMEM)
  106. case ENOMEM:
  107. throw EnomemExc (tmp);
  108. #endif
  109. #if defined (EACCES)
  110. case EACCES:
  111. throw EaccesExc (tmp);
  112. #endif
  113. #if defined (EFAULT)
  114. case EFAULT:
  115. throw EfaultExc (tmp);
  116. #endif
  117. #if defined (ENOTBLK)
  118. case ENOTBLK:
  119. throw EnotblkExc (tmp);
  120. #endif
  121. #if defined (EBUSY)
  122. case EBUSY:
  123. throw EbusyExc (tmp);
  124. #endif
  125. #if defined (EEXIST)
  126. case EEXIST:
  127. throw EexistExc (tmp);
  128. #endif
  129. #if defined (EXDEV)
  130. case EXDEV:
  131. throw ExdevExc (tmp);
  132. #endif
  133. #if defined (ENODEV)
  134. case ENODEV:
  135. throw EnodevExc (tmp);
  136. #endif
  137. #if defined (ENOTDIR)
  138. case ENOTDIR:
  139. throw EnotdirExc (tmp);
  140. #endif
  141. #if defined (EISDIR)
  142. case EISDIR:
  143. throw EisdirExc (tmp);
  144. #endif
  145. #if defined (EINVAL)
  146. case EINVAL:
  147. throw EinvalExc (tmp);
  148. #endif
  149. #if defined (ENFILE)
  150. case ENFILE:
  151. throw EnfileExc (tmp);
  152. #endif
  153. #if defined (EMFILE)
  154. case EMFILE:
  155. throw EmfileExc (tmp);
  156. #endif
  157. #if defined (ENOTTY)
  158. case ENOTTY:
  159. throw EnottyExc (tmp);
  160. #endif
  161. #if defined (ETXTBSY)
  162. case ETXTBSY:
  163. throw EtxtbsyExc (tmp);
  164. #endif
  165. #if defined (EFBIG)
  166. case EFBIG:
  167. throw EfbigExc (tmp);
  168. #endif
  169. #if defined (ENOSPC)
  170. case ENOSPC:
  171. throw EnospcExc (tmp);
  172. #endif
  173. #if defined (ESPIPE)
  174. case ESPIPE:
  175. throw EspipeExc (tmp);
  176. #endif
  177. #if defined (EROFS)
  178. case EROFS:
  179. throw ErofsExc (tmp);
  180. #endif
  181. #if defined (EMLINK)
  182. case EMLINK:
  183. throw EmlinkExc (tmp);
  184. #endif
  185. #if defined (EPIPE)
  186. case EPIPE:
  187. throw EpipeExc (tmp);
  188. #endif
  189. #if defined (EDOM)
  190. case EDOM:
  191. throw EdomExc (tmp);
  192. #endif
  193. #if defined (ERANGE)
  194. case ERANGE:
  195. throw ErangeExc (tmp);
  196. #endif
  197. #if defined (ENOMSG)
  198. case ENOMSG:
  199. throw EnomsgExc (tmp);
  200. #endif
  201. #if defined (EIDRM)
  202. case EIDRM:
  203. throw EidrmExc (tmp);
  204. #endif
  205. #if defined (ECHRNG)
  206. case ECHRNG:
  207. throw EchrngExc (tmp);
  208. #endif
  209. #if defined (EL2NSYNC)
  210. case EL2NSYNC:
  211. throw El2nsyncExc (tmp);
  212. #endif
  213. #if defined (EL3HLT)
  214. case EL3HLT:
  215. throw El3hltExc (tmp);
  216. #endif
  217. #if defined (EL3RST)
  218. case EL3RST:
  219. throw El3rstExc (tmp);
  220. #endif
  221. #if defined (ELNRNG)
  222. case ELNRNG:
  223. throw ElnrngExc (tmp);
  224. #endif
  225. #if defined (EUNATCH)
  226. case EUNATCH:
  227. throw EunatchExc (tmp);
  228. #endif
  229. #if defined (ENOSCI)
  230. case ENOCSI:
  231. throw EnocsiExc (tmp);
  232. #endif
  233. #if defined (EL2HLT)
  234. case EL2HLT:
  235. throw El2hltExc (tmp);
  236. #endif
  237. #if defined (EDEADLK)
  238. case EDEADLK:
  239. throw EdeadlkExc (tmp);
  240. #endif
  241. #if defined (ENOLCK)
  242. case ENOLCK:
  243. throw EnolckExc (tmp);
  244. #endif
  245. #if defined (EBADE)
  246. case EBADE:
  247. throw EbadeExc (tmp);
  248. #endif
  249. #if defined (EBADR)
  250. case EBADR:
  251. throw EbadrExc (tmp);
  252. #endif
  253. #if defined (EXFULL)
  254. case EXFULL:
  255. throw ExfullExc (tmp);
  256. #endif
  257. #if defined (ENOANO)
  258. case ENOANO:
  259. throw EnoanoExc (tmp);
  260. #endif
  261. #if defined (EBADRQC)
  262. case EBADRQC:
  263. throw EbadrqcExc (tmp);
  264. #endif
  265. #if defined (EBADSLT)
  266. case EBADSLT:
  267. throw EbadsltExc (tmp);
  268. #endif
  269. #if defined (EDEADLOCK) && defined (EDEADLK)
  270. #if EDEADLOCK != EDEADLK
  271. case EDEADLOCK:
  272. throw EdeadlockExc (tmp);
  273. #endif
  274. #elif defined (EDEADLOCK)
  275. case EDEADLOCK:
  276. throw EdeadlockExc (tmp);
  277. #endif
  278. #if defined (EBFONT)
  279. case EBFONT:
  280. throw EbfontExc (tmp);
  281. #endif
  282. #if defined (ENOSTR)
  283. case ENOSTR:
  284. throw EnostrExc (tmp);
  285. #endif
  286. #if defined (ENODATA)
  287. case ENODATA:
  288. throw EnodataExc (tmp);
  289. #endif
  290. #if defined (ETIME)
  291. case ETIME:
  292. throw EtimeExc (tmp);
  293. #endif
  294. #if defined (ENOSR)
  295. case ENOSR:
  296. throw EnosrExc (tmp);
  297. #endif
  298. #if defined (ENONET)
  299. case ENONET:
  300. throw EnonetExc (tmp);
  301. #endif
  302. #if defined (ENOPKG)
  303. case ENOPKG:
  304. throw EnopkgExc (tmp);
  305. #endif
  306. #if defined (EREMOTE)
  307. case EREMOTE:
  308. throw EremoteExc (tmp);
  309. #endif
  310. #if defined (ENOLINK)
  311. case ENOLINK:
  312. throw EnolinkExc (tmp);
  313. #endif
  314. #if defined (EADV)
  315. case EADV:
  316. throw EadvExc (tmp);
  317. #endif
  318. #if defined (ESRMNT)
  319. case ESRMNT:
  320. throw EsrmntExc (tmp);
  321. #endif
  322. #if defined (ECOMM)
  323. case ECOMM:
  324. throw EcommExc (tmp);
  325. #endif
  326. #if defined (EPROTO)
  327. case EPROTO:
  328. throw EprotoExc (tmp);
  329. #endif
  330. #if defined (EMULTIHOP)
  331. case EMULTIHOP:
  332. throw EmultihopExc (tmp);
  333. #endif
  334. #if defined (EBADMSG)
  335. case EBADMSG:
  336. throw EbadmsgExc (tmp);
  337. #endif
  338. #if defined (ENAMETOOLONG)
  339. case ENAMETOOLONG:
  340. throw EnametoolongExc (tmp);
  341. #endif
  342. #if defined (EOVERFLOW)
  343. case EOVERFLOW:
  344. throw EoverflowExc (tmp);
  345. #endif
  346. #if defined (ENOTUNIQ)
  347. case ENOTUNIQ:
  348. throw EnotuniqExc (tmp);
  349. #endif
  350. #if defined (EBADFD)
  351. case EBADFD:
  352. throw EbadfdExc (tmp);
  353. #endif
  354. #if defined (EREMCHG)
  355. case EREMCHG:
  356. throw EremchgExc (tmp);
  357. #endif
  358. #if defined (ELIBACC)
  359. case ELIBACC:
  360. throw ElibaccExc (tmp);
  361. #endif
  362. #if defined (ELIBBAD)
  363. case ELIBBAD:
  364. throw ElibbadExc (tmp);
  365. #endif
  366. #if defined (ELIBSCN)
  367. case ELIBSCN:
  368. throw ElibscnExc (tmp);
  369. #endif
  370. #if defined (ELIBMAX)
  371. case ELIBMAX:
  372. throw ElibmaxExc (tmp);
  373. #endif
  374. #if defined (ELIBEXEC)
  375. case ELIBEXEC:
  376. throw ElibexecExc (tmp);
  377. #endif
  378. #if defined (EILSEQ)
  379. case EILSEQ:
  380. throw EilseqExc (tmp);
  381. #endif
  382. #if defined (ENOSYS)
  383. case ENOSYS:
  384. throw EnosysExc (tmp);
  385. #endif
  386. #if defined (ELOOP)
  387. case ELOOP:
  388. throw EloopExc (tmp);
  389. #endif
  390. #if defined (ERESTART)
  391. case ERESTART:
  392. throw ErestartExc (tmp);
  393. #endif
  394. #if defined (ESTRPIPE)
  395. case ESTRPIPE:
  396. throw EstrpipeExc (tmp);
  397. #endif
  398. #if defined (ENOTEMPTY)
  399. case ENOTEMPTY:
  400. throw EnotemptyExc (tmp);
  401. #endif
  402. #if defined (EUSERS)
  403. case EUSERS:
  404. throw EusersExc (tmp);
  405. #endif
  406. #if defined (ENOTSOCK)
  407. case ENOTSOCK:
  408. throw EnotsockExc (tmp);
  409. #endif
  410. #if defined (EDESTADDRREQ)
  411. case EDESTADDRREQ:
  412. throw EdestaddrreqExc (tmp);
  413. #endif
  414. #if defined (EMSGSIZE)
  415. case EMSGSIZE:
  416. throw EmsgsizeExc (tmp);
  417. #endif
  418. #if defined (EPROTOTYPE)
  419. case EPROTOTYPE:
  420. throw EprototypeExc (tmp);
  421. #endif
  422. #if defined (ENOPROTOOPT)
  423. case ENOPROTOOPT:
  424. throw EnoprotooptExc (tmp);
  425. #endif
  426. #if defined (EPROTONOSUPPORT)
  427. case EPROTONOSUPPORT:
  428. throw EprotonosupportExc (tmp);
  429. #endif
  430. #if defined (ESOCKTNOSUPPORT)
  431. case ESOCKTNOSUPPORT:
  432. throw EsocktnosupportExc (tmp);
  433. #endif
  434. #if defined (EOPNOTSUPP)
  435. case EOPNOTSUPP:
  436. throw EopnotsuppExc (tmp);
  437. #endif
  438. #if defined (EPFNOSUPPORT)
  439. case EPFNOSUPPORT:
  440. throw EpfnosupportExc (tmp);
  441. #endif
  442. #if defined (EAFNOSUPPORT)
  443. case EAFNOSUPPORT:
  444. throw EafnosupportExc (tmp);
  445. #endif
  446. #if defined (EADDRINUSE)
  447. case EADDRINUSE:
  448. throw EaddrinuseExc (tmp);
  449. #endif
  450. #if defined (EADDRNOTAVAIL)
  451. case EADDRNOTAVAIL:
  452. throw EaddrnotavailExc (tmp);
  453. #endif
  454. #if defined (ENETDOWN)
  455. case ENETDOWN:
  456. throw EnetdownExc (tmp);
  457. #endif
  458. #if defined (ENETUNREACH)
  459. case ENETUNREACH:
  460. throw EnetunreachExc (tmp);
  461. #endif
  462. #if defined (ENETRESET)
  463. case ENETRESET:
  464. throw EnetresetExc (tmp);
  465. #endif
  466. #if defined (ECONNABORTED)
  467. case ECONNABORTED:
  468. throw EconnabortedExc (tmp);
  469. #endif
  470. #if defined (ECONNRESET)
  471. case ECONNRESET:
  472. throw EconnresetExc (tmp);
  473. #endif
  474. #if defined (ENOBUFS)
  475. case ENOBUFS:
  476. throw EnobufsExc (tmp);
  477. #endif
  478. #if defined (EISCONN)
  479. case EISCONN:
  480. throw EisconnExc (tmp);
  481. #endif
  482. #if defined (ENOTCONN)
  483. case ENOTCONN:
  484. throw EnotconnExc (tmp);
  485. #endif
  486. #if defined (ESHUTDOWN)
  487. case ESHUTDOWN:
  488. throw EshutdownExc (tmp);
  489. #endif
  490. #if defined (ETOOMANYREFS)
  491. case ETOOMANYREFS:
  492. throw EtoomanyrefsExc (tmp);
  493. #endif
  494. #if defined (ETIMEDOUT)
  495. case ETIMEDOUT:
  496. throw EtimedoutExc (tmp);
  497. #endif
  498. #if defined (ECONNREFUSED)
  499. case ECONNREFUSED:
  500. throw EconnrefusedExc (tmp);
  501. #endif
  502. #if defined (EHOSTDOWN)
  503. case EHOSTDOWN:
  504. throw EhostdownExc (tmp);
  505. #endif
  506. #if defined (EHOSTUNREACH)
  507. case EHOSTUNREACH:
  508. throw EhostunreachExc (tmp);
  509. #endif
  510. #if defined (EALREADY)
  511. case EALREADY:
  512. throw EalreadyExc (tmp);
  513. #endif
  514. #if defined (EINPROGRESS)
  515. case EINPROGRESS:
  516. throw EinprogressExc (tmp);
  517. #endif
  518. #if defined (ESTALE)
  519. case ESTALE:
  520. throw EstaleExc (tmp);
  521. #endif
  522. #if defined (EIORESID)
  523. case EIORESID:
  524. throw EioresidExc (tmp);
  525. #endif
  526. #if defined (EUCLEAN)
  527. case EUCLEAN:
  528. throw EucleanExc (tmp);
  529. #endif
  530. #if defined (ENOTNAM)
  531. case ENOTNAM:
  532. throw EnotnamExc (tmp);
  533. #endif
  534. #if defined (ENAVAIL)
  535. case ENAVAIL:
  536. throw EnavailExc (tmp);
  537. #endif
  538. #if defined (EISNAM)
  539. case EISNAM:
  540. throw EisnamExc (tmp);
  541. #endif
  542. #if defined (EREMOTEIO)
  543. case EREMOTEIO:
  544. throw EremoteioExc (tmp);
  545. #endif
  546. #if defined (EINIT)
  547. case EINIT:
  548. throw EinitExc (tmp);
  549. #endif
  550. #if defined (EREMDEV)
  551. case EREMDEV:
  552. throw EremdevExc (tmp);
  553. #endif
  554. #if defined (ECANCELED)
  555. case ECANCELED:
  556. throw EcanceledExc (tmp);
  557. #endif
  558. #if defined (ENOLIMFILE)
  559. case ENOLIMFILE:
  560. throw EnolimfileExc (tmp);
  561. #endif
  562. #if defined (EPROCLIM)
  563. case EPROCLIM:
  564. throw EproclimExc (tmp);
  565. #endif
  566. #if defined (EDISJOINT)
  567. case EDISJOINT:
  568. throw EdisjointExc (tmp);
  569. #endif
  570. #if defined (ENOLOGIN)
  571. case ENOLOGIN:
  572. throw EnologinExc (tmp);
  573. #endif
  574. #if defined (ELOGINLIM)
  575. case ELOGINLIM:
  576. throw EloginlimExc (tmp);
  577. #endif
  578. #if defined (EGROUPLOOP)
  579. case EGROUPLOOP:
  580. throw EgrouploopExc (tmp);
  581. #endif
  582. #if defined (ENOATTACH)
  583. case ENOATTACH:
  584. throw EnoattachExc (tmp);
  585. #endif
  586. #if defined (ENOTSUP) && defined (EOPNOTSUPP)
  587. #if ENOTSUP != EOPNOTSUPP
  588. case ENOTSUP:
  589. throw EnotsupExc (tmp);
  590. #endif
  591. #elif defined (ENOTSUP)
  592. case ENOTSUP:
  593. throw EnotsupExc (tmp);
  594. #endif
  595. #if defined (ENOATTR)
  596. case ENOATTR:
  597. throw EnoattrExc (tmp);
  598. #endif
  599. #if defined (EDIRCORRUPTED)
  600. case EDIRCORRUPTED:
  601. throw EdircorruptedExc (tmp);
  602. #endif
  603. #if defined (EDQUOT)
  604. case EDQUOT:
  605. throw EdquotExc (tmp);
  606. #endif
  607. #if defined (ENFSREMOTE)
  608. case ENFSREMOTE:
  609. throw EnfsremoteExc (tmp);
  610. #endif
  611. #if defined (ECONTROLLER)
  612. case ECONTROLLER:
  613. throw EcontrollerExc (tmp);
  614. #endif
  615. #if defined (ENOTCONTROLLER)
  616. case ENOTCONTROLLER:
  617. throw EnotcontrollerExc (tmp);
  618. #endif
  619. #if defined (EENQUEUED)
  620. case EENQUEUED:
  621. throw EenqueuedExc (tmp);
  622. #endif
  623. #if defined (ENOTENQUEUED)
  624. case ENOTENQUEUED:
  625. throw EnotenqueuedExc (tmp);
  626. #endif
  627. #if defined (EJOINED)
  628. case EJOINED:
  629. throw EjoinedExc (tmp);
  630. #endif
  631. #if defined (ENOTJOINED)
  632. case ENOTJOINED:
  633. throw EnotjoinedExc (tmp);
  634. #endif
  635. #if defined (ENOPROC)
  636. case ENOPROC:
  637. throw EnoprocExc (tmp);
  638. #endif
  639. #if defined (EMUSTRUN)
  640. case EMUSTRUN:
  641. throw EmustrunExc (tmp);
  642. #endif
  643. #if defined (ENOTSTOPPED)
  644. case ENOTSTOPPED:
  645. throw EnotstoppedExc (tmp);
  646. #endif
  647. #if defined (ECLOCKCPU)
  648. case ECLOCKCPU:
  649. throw EclockcpuExc (tmp);
  650. #endif
  651. #if defined (EINVALSTATE)
  652. case EINVALSTATE:
  653. throw EinvalstateExc (tmp);
  654. #endif
  655. #if defined (ENOEXIST)
  656. case ENOEXIST:
  657. throw EnoexistExc (tmp);
  658. #endif
  659. #if defined (EENDOFMINOR)
  660. case EENDOFMINOR:
  661. throw EendofminorExc (tmp);
  662. #endif
  663. #if defined (EBUFSIZE)
  664. case EBUFSIZE:
  665. throw EbufsizeExc (tmp);
  666. #endif
  667. #if defined (EEMPTY)
  668. case EEMPTY:
  669. throw EemptyExc (tmp);
  670. #endif
  671. #if defined (ENOINTRGROUP)
  672. case ENOINTRGROUP:
  673. throw EnointrgroupExc (tmp);
  674. #endif
  675. #if defined (EINVALMODE)
  676. case EINVALMODE:
  677. throw EinvalmodeExc (tmp);
  678. #endif
  679. #if defined (ECANTEXTENT)
  680. case ECANTEXTENT:
  681. throw EcantextentExc (tmp);
  682. #endif
  683. #if defined (EINVALTIME)
  684. case EINVALTIME:
  685. throw EinvaltimeExc (tmp);
  686. #endif
  687. #if defined (EDESTROYED)
  688. case EDESTROYED:
  689. throw EdestroyedExc (tmp);
  690. #endif
  691. }
  692. throw ErrnoExc (tmp);
  693. }
  694. void throwErrnoExc (const std::string &text)
  695. {
  696. throwErrnoExc (text, errno);
  697. }
  698. void throwErrnoExc()
  699. {
  700. std::string txt = "%T.";
  701. throwErrnoExc (txt);
  702. }
  703. IEX_INTERNAL_NAMESPACE_SOURCE_EXIT