Skip to content

Commit

Permalink
Improved error reporting context
Browse files Browse the repository at this point in the history
  • Loading branch information
joanasesinando committed Sep 5, 2024
1 parent f628dce commit 6d05358
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gerador-horarios-ist",
"version": "1.5.0",
"version": "1.5.1",
"description": "Gerador de horários para o Instituto Superior Técnico.",
"homepage": "https://web.tecnico.ulisboa.pt/joanasesinando/gerador-horarios",
"license": "MIT. See license in https://github.com/joanasesinando/gerador-horarios-ist/blob/master/LICENSE",
Expand Down Expand Up @@ -73,4 +73,4 @@
"tslint": "~6.1.0",
"typescript": "~5.4.5"
}
}
}
18 changes: 12 additions & 6 deletions src/app/_services/fenix/fenix.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export class FenixService {
degrees.push(degree);
}
} catch (error) { this.errorService.showError(error, {
While: 'Getting degress',
While: 'Getting degrees',
academicTerm
}); }
}
Expand Down Expand Up @@ -348,10 +348,13 @@ export class FenixService {

courses.push(course);
} catch (error) {
const degree: Degree = this.stateService.degreesRepository.get(academicTerm).find(degree => degree.id === degreeId);
this.errorService.showError(error, {
While: 'Getting courses basic info',
academicTerm,
degreeId
'Academic Term': academicTerm,
'Degree ID': degreeId,
'Degree Acronym': degree.acronym,
'Degree Name': degree.name
});
}
}
Expand Down Expand Up @@ -451,9 +454,12 @@ export class FenixService {

} else this.errorService.showError(error, {
While: 'Getting missing course info',
courseId: course.id,
courseName: course.name,
courseAcronym: course.acronym
'Degree ID': course.degree.id,
'Degree Acronym': course.degree.acronym,
'Degree Name': course.degree.name,
'Course ID': course.id,
'Course Name': course.name,
'Course Acronym': course.acronym
});
}
});
Expand Down

0 comments on commit 6d05358

Please sign in to comment.