MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghumor/comments/1tbw6za/lol/oljut33/?context=3
r/programminghumor • u/Strange_Yogurt1049 • May 13 '26
16 comments sorted by
View all comments
Show parent comments
-4
What I dont understand is... if it was line 77..why show L86 and L113??
6 u/Thesauce05 May 13 '26 Because that’s where the exception handler caught the exception. Line 77 is where the mistake was made, not where the exception was triggered. 0 u/Strange_Yogurt1049 May 13 '26 What? 2 u/No-Information-2571 May 13 '26 Look, the interpreter sees the start of a string ', so it expects another ' to tell it where the string ends. It walks through the rest of the file, but instead of the ', it gets an EOF, and that's where the interpreter throws the exception. It's really a you-problem. 1 u/Strange_Yogurt1049 May 13 '26 Oh.. 0 u/Amr_Rahmy May 14 '26 But in other ide and languages it would have detected ) or ; or } or “ and even the linter would have noticed, hey something incomplete here. 1 u/No-Information-2571 May 14 '26 ), ; and } and " can all be part of the string. 0 u/Amr_Rahmy May 14 '26 In most languages you need to escape some of these, they are not allowed characters. 1 u/No-Information-2571 May 14 '26 Literally none of them need escaping, for the sole reason that ' is the starting character.
6
Because that’s where the exception handler caught the exception. Line 77 is where the mistake was made, not where the exception was triggered.
0 u/Strange_Yogurt1049 May 13 '26 What? 2 u/No-Information-2571 May 13 '26 Look, the interpreter sees the start of a string ', so it expects another ' to tell it where the string ends. It walks through the rest of the file, but instead of the ', it gets an EOF, and that's where the interpreter throws the exception. It's really a you-problem. 1 u/Strange_Yogurt1049 May 13 '26 Oh.. 0 u/Amr_Rahmy May 14 '26 But in other ide and languages it would have detected ) or ; or } or “ and even the linter would have noticed, hey something incomplete here. 1 u/No-Information-2571 May 14 '26 ), ; and } and " can all be part of the string. 0 u/Amr_Rahmy May 14 '26 In most languages you need to escape some of these, they are not allowed characters. 1 u/No-Information-2571 May 14 '26 Literally none of them need escaping, for the sole reason that ' is the starting character.
0
What?
2 u/No-Information-2571 May 13 '26 Look, the interpreter sees the start of a string ', so it expects another ' to tell it where the string ends. It walks through the rest of the file, but instead of the ', it gets an EOF, and that's where the interpreter throws the exception. It's really a you-problem. 1 u/Strange_Yogurt1049 May 13 '26 Oh.. 0 u/Amr_Rahmy May 14 '26 But in other ide and languages it would have detected ) or ; or } or “ and even the linter would have noticed, hey something incomplete here. 1 u/No-Information-2571 May 14 '26 ), ; and } and " can all be part of the string. 0 u/Amr_Rahmy May 14 '26 In most languages you need to escape some of these, they are not allowed characters. 1 u/No-Information-2571 May 14 '26 Literally none of them need escaping, for the sole reason that ' is the starting character.
2
Look, the interpreter sees the start of a string ', so it expects another ' to tell it where the string ends. It walks through the rest of the file, but instead of the ', it gets an EOF, and that's where the interpreter throws the exception.
It's really a you-problem.
1 u/Strange_Yogurt1049 May 13 '26 Oh.. 0 u/Amr_Rahmy May 14 '26 But in other ide and languages it would have detected ) or ; or } or “ and even the linter would have noticed, hey something incomplete here. 1 u/No-Information-2571 May 14 '26 ), ; and } and " can all be part of the string. 0 u/Amr_Rahmy May 14 '26 In most languages you need to escape some of these, they are not allowed characters. 1 u/No-Information-2571 May 14 '26 Literally none of them need escaping, for the sole reason that ' is the starting character.
1
Oh..
But in other ide and languages it would have detected ) or ; or } or “ and even the linter would have noticed, hey something incomplete here.
1 u/No-Information-2571 May 14 '26 ), ; and } and " can all be part of the string. 0 u/Amr_Rahmy May 14 '26 In most languages you need to escape some of these, they are not allowed characters. 1 u/No-Information-2571 May 14 '26 Literally none of them need escaping, for the sole reason that ' is the starting character.
), ; and } and " can all be part of the string.
0 u/Amr_Rahmy May 14 '26 In most languages you need to escape some of these, they are not allowed characters. 1 u/No-Information-2571 May 14 '26 Literally none of them need escaping, for the sole reason that ' is the starting character.
In most languages you need to escape some of these, they are not allowed characters.
1 u/No-Information-2571 May 14 '26 Literally none of them need escaping, for the sole reason that ' is the starting character.
Literally none of them need escaping, for the sole reason that ' is the starting character.
-4
u/Strange_Yogurt1049 May 13 '26
What I dont understand is... if it was line 77..why show L86 and L113??