Skip to content

Instantly share code, notes, and snippets.

View pdr-tuche's full-sized avatar
:octocat:
little media, lots of code ❌🧢

Pedro Neves pdr-tuche

:octocat:
little media, lots of code ❌🧢
View GitHub Profile
@pdr-tuche
pdr-tuche / express_async_errors.js
Created February 19, 2024 04:30 — forked from luizomf/express_async_errors.js
Express Async Errors
/* Express Route Adapter */
const resolver = (handlerFn) => {
return (req, res, next) => {
return Promise.resolve(handlerFn(req, res, next))
.catch(e => next(e));
}
}
/* Errors */
class InternalServerError extends Error {
#!/usr/bin/bash
echo "🐺 Digite o nome do perfil do vscode: "
read profileName
profile=""
if [ $profileName != "" ]; then
profile="--profile $profileName"
fi
code --install-extension Angular.ng-template $profile &&