{"id":23244662,"url":"https://github.com/bytemechanics/type-ex","last_synced_at":"2025-04-06T00:16:39.909Z","repository":{"id":57739045,"uuid":"112016615","full_name":"bytemechanics/type-ex","owner":"bytemechanics","description":"Library to create exceptions typified in a enumerated, in order to be able to list all possible exceptions in one application.","archived":false,"fork":false,"pushed_at":"2019-04-09T15:52:03.000Z","size":41,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T06:24:24.423Z","etag":null,"topics":["exception-repository","exceptions","exceptions-typified","java","library"],"latest_commit_sha":null,"homepage":"https://type-ex.bytemechanics.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bytemechanics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-25T16:05:38.000Z","updated_at":"2019-04-25T19:27:04.000Z","dependencies_parsed_at":"2022-08-24T17:40:19.434Z","dependency_job_id":null,"html_url":"https://github.com/bytemechanics/type-ex","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytemechanics%2Ftype-ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytemechanics%2Ftype-ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytemechanics%2Ftype-ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytemechanics%2Ftype-ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytemechanics","download_url":"https://codeload.github.com/bytemechanics/type-ex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415967,"owners_count":20935387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["exception-repository","exceptions","exceptions-typified","java","library"],"created_at":"2024-12-19T07:10:12.114Z","updated_at":"2025-04-06T00:16:39.882Z","avatar_url":"https://github.com/bytemechanics.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Type-ex\n[![Latest version](https://maven-badges.herokuapp.com/maven-central/org.bytemechanics/type-ex/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.bytemechanics/type-ex/badge.svg)\n[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=org.bytemechanics%3Atype-ex\u0026metric=alert_status)](https://sonarcloud.io/dashboard/index/org.bytemechanics%3Atype-ex)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=org.bytemechanics%3Atype-ex\u0026metric=coverage)](https://sonarcloud.io/dashboard/index/org.bytemechanics%3Atype-ex)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nType-ex it's a library to make easy application errors classification. \n\n## Motivation\nIn the old times all application errors were indexed in never-ending lists in big manuals to describe the possible problems and its solutions. \n\n## Quick start\n1. First of all include the Jar file in your compile and execution classpath.\n**Maven**\n```Maven\n\t\u003cdependency\u003e\n\t\t\u003cgroupId\u003eorg.bytemechanics\u003c/groupId\u003e\n\t\t\u003cartifactId\u003etype-ex\u003c/artifactId\u003e\n\t\t\u003cversion\u003eX.X.X\u003c/version\u003e\n\t\u003c/dependency\u003e\n```\n**Graddle**\n```Gradle\ndependencies {\n    compile 'org.bytemechanics:type-ex:X.X.X'\n}\n```\n1. Create your typified exceptions\n```Java\npackage mypackage;\nimport org.bytemechanics.typeex.impl.TypifiedException;\npublic enum MyExceptionType implements ExceptionType\u003cTypifiedException\u003e{\n\tEXCEPTION_TYPE_NO_PARAMETERIZED(\"This message has no substitution parameters\"),\n\tEXCEPTION_TYPE_PARAMETERIZED(\"This message has two {} substitution parameters {}\"),\n\t;\t\n\tprivate final String message;\n\tMyExceptionType(final String _message){\n\t\tthis.message=_message;\n\t}\t\n\t@Override\n\tpublic String getMessage() {\n\t\treturn this.message;\n\t}\n}\n```\n1. Launch an exception\n**Manually**\n```Java\nthrow MyExceptionType.EXCEPTION_TYPE_PARAMETERIZED\n\t\t\t\t\t\t.from(cause)\n\t\t\t\t\t\t.with(\"String1\",1);\n```\n**From lambda**\n```Java\nOptional.of(null)\n\t\t.orElseThrow(MyExceptionType.EXCEPTION_TYPE_PARAMETERIZED\n\t\t\t\t\t\t.from(cause)\n\t\t\t\t\t\t.with(\"String1\",1))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytemechanics%2Ftype-ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytemechanics%2Ftype-ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytemechanics%2Ftype-ex/lists"}