Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async error catch #368

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added pdf/cool.pdf
Binary file not shown.
Binary file modified pdf/creative.pdf
Binary file not shown.
Binary file modified pdf/left-right-rtl.pdf
Binary file not shown.
Binary file modified pdf/left-right.pdf
Binary file not shown.
Binary file modified pdf/material-dark.pdf
Binary file not shown.
Binary file modified pdf/oblique.pdf
Binary file not shown.
Binary file modified pdf/purple.pdf
Binary file not shown.
Binary file modified pdf/side-bar-rtl.pdf
Binary file not shown.
Binary file modified pdf/side-bar.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions resume/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ knowledge: Also proficient in Adobe Photoshop and Illustrator, grew up bilingual
projects:
- name: best-resume-ever
platform: Vue
timeperiod: February 2016
description: 👔 💼 Build fast 🚀 and easy multiple beautiful resumes and create your best CV ever! Made with Vue and LESS.
url: https://github.com/salomonelli/best-resume-ever

Expand Down
7 changes: 3 additions & 4 deletions scripts/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const fs = require('fs');
const path = require('path');
const http = require('http');
const config = require('../config');

const {
interval
} = require('rxjs');
Expand Down Expand Up @@ -61,7 +60,7 @@ const convert = async () => {
const page = await browser.newPage();
await page.goto(`http://localhost:${config.dev.port}/#/resume/` + dir.name, {
waitUntil: 'networkidle2'
});
}).catch(console.error);;

if (
!fs.existsSync(fullDirectoryPath)
Expand All @@ -71,8 +70,8 @@ const convert = async () => {
await page.pdf({
path: fullDirectoryPath + dir.name + '.pdf',
format: 'A4'
});
await browser.close();
}).catch(console.error);
await browser.close().catch(console.error);;
});
} catch (err) {
throw new Error(err);
Expand Down
2 changes: 1 addition & 1 deletion scripts/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const getTemplateName = PDF => {

const convert = async (PDF) => {
const pdfImage = new PDFImage(path.join(__dirname, '../pdf/' + PDF));
await pdfImage.convertPage(0);
await pdfImage.convertPage(0).catch(console.error);
};

const directories = getDirectories();
Expand Down