Title: Expose libgit2 error code to clients when a promise fails by rcjsuen · Pull Request #1209 · nodegit/nodegit · GitHub
Open Graph Title: Expose libgit2 error code to clients when a promise fails by rcjsuen · Pull Request #1209 · nodegit/nodegit
X Title: Expose libgit2 error code to clients when a promise fails by rcjsuen · Pull Request #1209 · nodegit/nodegit
Description: This PR fixes up the C++ templates so that libgit2's error code is exposed on the JavaScript side by analyzing the rejected promise. return git.Merge.base(repo, parents[0], parents[1]) .then(function(base) { // do whatever }) .catch(function(err) { console.log(err); console.log(err.msg); console.log(err.errno); }); // err { [Error: No merge base found] errno: -3 } // err.msg No merge base found // err.errno -3
Open Graph Description: This PR fixes up the C++ templates so that libgit2's error code is exposed on the JavaScript side by analyzing the rejected promise. return git.Merge.base(repo, parents[0], parents[1]) .then(fu...
X Description: This PR fixes up the C++ templates so that libgit2's error code is exposed on the JavaScript side by analyzing the rejected promise. return git.Merge.base(repo, parents[0], parents[1]) .the...
Opengraph URL: https://github.com/nodegit/nodegit/pull/1209
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:fe0822e3-9623-12ac-7dc4-09d9bb6eebb0 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AE94:1FFB57:46D90B4:62ECD1D:6A5FB5A5 |
| html-safe-nonce | 135bdbbf7c7a63bb63df0c1cf41b7d1590091cc06d234b3cc74cd8439ac5b3bf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTk0OjFGRkI1Nzo0NkQ5MEI0OjYyRUNEMUQ6NkE1RkI1QTUiLCJ2aXNpdG9yX2lkIjoiNTE4ODQ4MTE3ODY2OTEzNTI2OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c40d719c2dae9d54099e4f3e34af5c0a138428562dfc5ac7f205b00a396a87cd |
| hovercard-subject-tag | pull_request:103906387 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodegit/nodegit/pull/1209/files |
| twitter:image | https://avatars.githubusercontent.com/u/15629116?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/15629116?s=400&v=4 |
| og:image:alt | This PR fixes up the C++ templates so that libgit2's error code is exposed on the JavaScript side by analyzing the rejected promise. return git.Merge.base(repo, parents[0], parents[1]) .then(fu... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e0cfc367faf9c4c774d2a903897aa214c786247c4f45ffcee48cda2b819fb0c8 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git |
| octolytics-dimension-user_id | 657068 |
| octolytics-dimension-user_login | nodegit |
| octolytics-dimension-repository_id | 1383170 |
| octolytics-dimension-repository_nwo | nodegit/nodegit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1383170 |
| octolytics-dimension-repository_network_root_nwo | nodegit/nodegit |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 94569c859bc88d6bf7de7e0ce3f2a11cd529a131 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width