{"id":32184622,"url":"https://github.com/nomicflux/danger-mouse","last_synced_at":"2026-07-13T19:32:30.108Z","repository":{"id":161066842,"uuid":"342405271","full_name":"nomicflux/danger-mouse","owner":"nomicflux","description":"Error Handling in Clojure","archived":false,"fork":false,"pushed_at":"2024-02-27T15:02:27.000Z","size":261,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T23:54:56.901Z","etag":null,"topics":["clojure","error-handling"],"latest_commit_sha":null,"homepage":"https://nomicflux.github.io/danger-mouse","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nomicflux.png","metadata":{"files":{"readme":"README.html","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-25T23:17:32.000Z","updated_at":"2023-10-17T17:54:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"a30fc7ec-0aa2-42f6-b361-1ce17582ed47","html_url":"https://github.com/nomicflux/danger-mouse","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/nomicflux/danger-mouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomicflux%2Fdanger-mouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomicflux%2Fdanger-mouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomicflux%2Fdanger-mouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomicflux%2Fdanger-mouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nomicflux","download_url":"https://codeload.github.com/nomicflux/danger-mouse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomicflux%2Fdanger-mouse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35434586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","error-handling"],"created_at":"2025-10-21T23:54:52.190Z","updated_at":"2026-07-13T19:32:30.102Z","avatar_url":"https://github.com/nomicflux.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c?xml version=\"1.0\" encoding=\"UTF-8\" ?\u003e\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"\u003e\n\n\u003chtml xmlns=\"http://www.w3.org/1999/xhtml\"\u003e\n\n\u003chead\u003e\n\u003ctitle\u003eREADME.html\u003c/title\u003e\n\u003cmeta http-equiv=\"Content-Type\" content=\"application/xhtml+xml;charset=utf-8\"/\u003e\n\u003clink rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"https://cdn.jsdelivr.net/npm/github-markdown-css/github-markdown.min.css\"  /\u003e\n\u003clink rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/styles/github.min.css\"  /\u003e\u003cmeta name='viewport' content='width=device-width, initial-scale=1, shrink-to-fit=no'\u003e\u003cstyle\u003e body { box-sizing: border-box; max-width: 740px; width: 100%; margin: 40px auto; padding: 0 10px; } \u003c/style\u003e\u003cscript id='MathJax-script' async src='https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js'\u003e\u003c/script\u003e\u003cscript src='https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/highlight.min.js'\u003e\u003c/script\u003e\u003cscript\u003edocument.addEventListener('DOMContentLoaded', () =\u003e { document.body.classList.add('markdown-body'); document.querySelectorAll('pre[lang] \u003e code').forEach((code) =\u003e { code.classList.add(code.parentElement.lang); }); document.querySelectorAll('pre \u003e code').forEach((code) =\u003e { hljs.highlightBlock(code); }); });\u003c/script\u003e\n\u003c/head\u003e\n\n\u003cbody\u003e\n\n\u003ch1 id=\"danger-mouse\"\u003edanger-mouse\u003c/h1\u003e\n\u003cp\u003eError handling for processing pipelines of information in Clojure.\u003c/p\u003e\n\u003ch2 id=\"usage\"\u003eUsage\u003c/h2\u003e\n\u003cp\u003eCapturing errors for reporting while continuing to process data:\u003c/p\u003e\n\u003cdiv class=\"sourceCode\"\u003e\u003cpre class=\"sourceCode clojure\"\u003e\u003ccode class=\"sourceCode clojure\"\u003e(danger-mouse.catch-errors/catch-errors-\u0026gt; [\u003cspan class=\"dv\"\u003e1\u003c/span\u003e \u003cspan class=\"dv\"\u003e2\u003c/span\u003e \u003cspan class=\"dv\"\u003e3\u003c/span\u003e]\n  (\u003cspan class=\"kw\"\u003emap\u003c/span\u003e \u003cspan class=\"kw\"\u003einc\u003c/span\u003e)\n  (\u003cspan class=\"kw\"\u003emap\u003c/span\u003e #(\u003cspan class=\"kw\"\u003eif\u003c/span\u003e (\u003cspan class=\"kw\"\u003eeven?\u003c/span\u003e %) % (\u003cspan class=\"kw\"\u003ethrow\u003c/span\u003e (Exception. (\u003cspan class=\"kw\"\u003estr\u003c/span\u003e %)))))\n  (\u003cspan class=\"kw\"\u003emap\u003c/span\u003e #(\u003cspan class=\"kw\"\u003e*\u003c/span\u003e % \u003cspan class=\"dv\"\u003e10\u003c/span\u003e)))\n\n\u003cspan class=\"kw\"\u003e\u0026gt;\u003c/span\u003e {\u003cspan class=\"kw\"\u003e:result\u003c/span\u003e [\u003cspan class=\"dv\"\u003e20\u003c/span\u003e \u003cspan class=\"dv\"\u003e40\u003c/span\u003e]\n   \u003cspan class=\"kw\"\u003e:errors\u003c/span\u003e [{\u003cspan class=\"kw\"\u003e:error-msg\u003c/span\u003e \u003cspan class=\"st\"\u003e\u0026quot;3\u0026quot;\u003c/span\u003e\n             \u003cspan class=\"kw\"\u003e:input\u003c/span\u003e \u003cspan class=\"dv\"\u003e2\u003c/span\u003e\n             \u003cspan class=\"kw\"\u003e:error\u003c/span\u003e ....}]}\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp\u003eUsing \u003ccode\u003etry-catch\u003c/code\u003e as a function, then apply different functions over errors and successes:\u003c/p\u003e\n\u003cdiv class=\"sourceCode\"\u003e\u003cpre class=\"sourceCode clojure\"\u003e\u003ccode class=\"sourceCode clojure\"\u003e(\u003cspan class=\"kw\"\u003e-\u0026gt;\u0026gt;\u003c/span\u003e (danger-mouse.macros/try-catch (\u003cspan class=\"kw\"\u003ethrow\u003c/span\u003e (Exception. \u003cspan class=\"st\"\u003e\u0026quot;Oops\u0026quot;\u003c/span\u003e)))\n     (danger-mouse.utils/resolve ex-message \u003cspan class=\"kw\"\u003estr\u003c/span\u003e))\n\n\u003cspan class=\"kw\"\u003e\u0026gt;\u003c/span\u003e \u003cspan class=\"st\"\u003e\u0026quot;Oops\u0026quot;\u003c/span\u003e\n\n(\u003cspan class=\"kw\"\u003e-\u0026gt;\u0026gt;\u003c/span\u003e (danger-mouse.macros/try-catch \u003cspan class=\"dv\"\u003e1\u003c/span\u003e)\n     (danger-mouse.utils/resolve ex-message \u003cspan class=\"kw\"\u003estr\u003c/span\u003e))\n\n\u003cspan class=\"kw\"\u003e\u0026gt;\u003c/span\u003e \u003cspan class=\"st\"\u003e\u0026quot;1\u0026quot;\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003ch2 id=\"license\"\u003eLicense\u003c/h2\u003e\n\u003cp\u003eMIT License\u003c/p\u003e\n\u003cp\u003eCopyright © 2021-2023 Michael Anderson\u003c/p\u003e\n\u003cp\u003ePermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u0026quot;Software\u0026quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\u003c/p\u003e\n\u003cp\u003eThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\u003c/p\u003e\n\u003cp\u003eTHE SOFTWARE IS PROVIDED \u0026quot;AS IS\u0026quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\u003c/p\u003e\n\n\u003c/body\u003e\n\u003c/html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomicflux%2Fdanger-mouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnomicflux%2Fdanger-mouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomicflux%2Fdanger-mouse/lists"}