Title: Consider using xpcall in try block · Issue #1478 · TypeScriptToLua/TypeScriptToLua · GitHub
Open Graph Title: Consider using xpcall in try block · Issue #1478 · TypeScriptToLua/TypeScriptToLua
X Title: Consider using xpcall in try block · Issue #1478 · TypeScriptToLua/TypeScriptToLua
Description: Error message from pcall only include the first line that error happened but not the full stack traceback, but this can be done by compiling to using xpcall and pass debug.traceback as second arg: local result local function ____catch(er...
Open Graph Description: Error message from pcall only include the first line that error happened but not the full stack traceback, but this can be done by compiling to using xpcall and pass debug.traceback as second arg: ...
X Description: Error message from pcall only include the first line that error happened but not the full stack traceback, but this can be done by compiling to using xpcall and pass debug.traceback as second arg: ...
Opengraph URL: https://github.com/TypeScriptToLua/TypeScriptToLua/issues/1478
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consider using xpcall in try block","articleBody":"Error message from pcall only include the first line that error happened but not the full stack traceback, but this can be done by compiling to using `xpcall` and pass `debug.traceback` as second arg:\r\n```\r\nlocal result\r\nlocal function ____catch(err)\r\n print(\"catch:\", err)\r\nend\r\nlocal ____try, ____hasReturned = xpcall(\r\n function()\r\n result = dosomething(args)\r\n end,\r\n debug.traceback\r\n)\r\nif not ____try then\r\n ____catch(____hasReturned)\r\nend\r\n```\r\n\r\nAlthough custom plugin can implement this feature, but plugin can not rewrite lualib such as pcall in Promise.lua","author":{"url":"https://github.com/pilaoda","@type":"Person","name":"pilaoda"},"datePublished":"2023-08-25T12:34:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/1478/TypeScriptToLua/issues/1478"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3a49390d-dce3-6a8e-ebd5-5f09a6f1cfa0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8424:3A43B0:C30EB4:1025DA4:69716E41 |
| html-safe-nonce | 14f7e7b9d457150989d81e0b567e6e49fc5daf8b9b508f0a7caa75020cf4c2f5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDI0OjNBNDNCMDpDMzBFQjQ6MTAyNURBNDo2OTcxNkU0MSIsInZpc2l0b3JfaWQiOiIxMDExODgwMjE3ODAzODQ1MTg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f2fc570348db5887bfc8a83dc8e51562a7875dbe1b6c25624fae95c538a35145 |
| hovercard-subject-tag | issue:1866979237 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/TypeScriptToLua/TypeScriptToLua/1478/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f0c41fc4a940e537da3863c76edfa899417fd1a911842add8fbf841603d1d39a/TypeScriptToLua/TypeScriptToLua/issues/1478 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f0c41fc4a940e537da3863c76edfa899417fd1a911842add8fbf841603d1d39a/TypeScriptToLua/TypeScriptToLua/issues/1478 |
| og:image:alt | Error message from pcall only include the first line that error happened but not the full stack traceback, but this can be done by compiling to using xpcall and pass debug.traceback as second arg: ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pilaoda |
| hostname | github.com |
| expected-hostname | github.com |
| None | 353479110ec1e87d687013548f216c852055ec907d09d2fb6a180cb5ed9d28e1 |
| turbo-cache-control | no-preview |
| go-import | github.com/TypeScriptToLua/TypeScriptToLua git https://github.com/TypeScriptToLua/TypeScriptToLua.git |
| octolytics-dimension-user_id | 44121206 |
| octolytics-dimension-user_login | TypeScriptToLua |
| octolytics-dimension-repository_id | 115876595 |
| octolytics-dimension-repository_nwo | TypeScriptToLua/TypeScriptToLua |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 115876595 |
| octolytics-dimension-repository_network_root_nwo | TypeScriptToLua/TypeScriptToLua |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a4c7e274c03a115b82dcef6c47ce3f7f903e88e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width