Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Conversation

KristinaKoeva
Copy link
Contributor

The code used to read only the first digit, but according to the documentation the signal code is a two-digit hexadecimal number
With the current version of the runtime the signal that is raised is SIGABRT == 0x06

Fixes NativeScript/nativescript-cli#2053

@justcodebuilduser
Copy link

❤️

Copy link
Collaborator

@rosen-vladimirov rosen-vladimirov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After fixing comment

for (let i = 0; i < packet.length - 2; i++) {
// The reply packages take the following form (the space in the reply templates is included for clarity)
// ‘S AA’ or ‘T AA n1:r1;n2:r2;...’ meaning that the program received signal number AA (a two-digit hexadecimal number)
for (let i = 0; i < packet.length - 3; i++) {
if (packet[i] === getCharacterCodePoint("$") && (packet[i + 1] === getCharacterCodePoint("T") || packet[i + 1] === getCharacterCodePoint("S"))) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move the values of $, T and S code points to a constants outside of the for as currently they are evaluated on each iteration

@KristinaKoeva KristinaKoeva force-pushed the KristinaKoeva/Exception branch from 5df41b1 to 815716f Compare November 7, 2016 08:47
@justcodebuilduser
Copy link

❤️

The code used to read only the first digit, but according to the documentation the signal code is a two-digit hexadecimal number
With the current version of the runtime the signal that is raised is SIGABRT == 0x06
@KristinaKoeva KristinaKoeva force-pushed the KristinaKoeva/Exception branch from 815716f to e27c431 Compare November 7, 2016 09:30
@justcodebuilduser
Copy link

❤️

@KristinaKoeva KristinaKoeva merged commit 550bf55 into master Nov 7, 2016
@KristinaKoeva KristinaKoeva deleted the KristinaKoeva/Exception branch November 7, 2016 09:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants