{"id":32203094,"url":"https://github.com/tadascience/slap","last_synced_at":"2026-02-22T19:04:50.748Z","repository":{"id":231888396,"uuid":"782961618","full_name":"tadascience/slap","owner":"tadascience","description":"Slap Light Alternative Plight","archived":false,"fork":false,"pushed_at":"2024-05-02T07:51:08.000Z","size":1438,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-09T11:48:47.260Z","etag":null,"topics":["bat","batman","error-handling","r","slap"],"latest_commit_sha":null,"homepage":"http://slap.tada.science/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tadascience.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.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":"2024-04-06T14:43:57.000Z","updated_at":"2024-05-15T12:51:17.000Z","dependencies_parsed_at":"2024-04-06T15:48:44.754Z","dependency_job_id":"b9521491-1be9-4680-9fd1-2d360eb6adbd","html_url":"https://github.com/tadascience/slap","commit_stats":null,"previous_names":["tadascience/slap"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tadascience/slap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadascience%2Fslap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadascience%2Fslap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadascience%2Fslap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadascience%2Fslap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tadascience","download_url":"https://codeload.github.com/tadascience/slap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tadascience%2Fslap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29723574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T15:10:41.462Z","status":"ssl_error","status_checked_at":"2026-02-22T15:10:04.636Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bat","batman","error-handling","r","slap"],"created_at":"2025-10-22T04:30:58.536Z","updated_at":"2026-02-22T19:04:50.740Z","avatar_url":"https://github.com/tadascience.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# slap \u003ca href=\"https://slap.tada.science\"\u003e\u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"138\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n[![CRAN status](https://www.r-pkg.org/badges/version/slap)](https://CRAN.R-project.org/package=slap)\n[![R-CMD-check](https://github.com/tadascience/slap/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tadascience/slap/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\nThe goal of slap is simplify error handling. \n\n## Installation\n\n``` r\npak::pak(\"tadascience/slap\")\n```\n\n## Example\n\n```{r, eval = FALSE}\nlibrary(dplyr)\nlibrary(slap)\n\n# suppose you have a function that throws an error\nboom \u003c- function() stop(\"An error occured in boom()\")\n# and you want to use it in e.g. dplyr::summarise()\n# summarise(mtcars, mpg = boom())\n\n# if you want to catch it and rethrow an error that is more\n# meaningful to you, one way is to use withCallingHandlers()\nwithCallingHandlers(\n  summarise(mtcars, mpg = boom()), \n  error = function(err) {\n    cli::cli_abort(\"ouch\", parent = err)\n  }\n)\n\n# but that's kind of boring, so instead you can use the \n# slap operator %!% to slap away the eror\nsummarise(mtcars, mpg = boom()) %!% \"ouch\"\n\n# or the double slap operator %!!% if you don't want to keep the parent error\nsummarise(mtcars, mpg = boom()) %!!% \"ouch\" \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftadascience%2Fslap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftadascience%2Fslap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftadascience%2Fslap/lists"}