Yet another way of encoding an arbitrary amount of data #182
tux2603
started this conversation in
Show and tell
Replies: 1 comment
-
I've never heard of that before, cool idea! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The
#line
preprocessor directive allows you to modify the line number and file name reported by exceptions, but since it's handled by the preprocessor the tokenization script never counts it. As a result, you can embed a string variable of an arbitrary length into the stack trace of an exception and then extract it using a simple substring. This is already covered by the "You may not store data inside the name of a variable/function/class etc" rule, so I didn't think it needs a full-blown issue opened, but I still wanted to share what I found.Here's an example where five full paragraphs of Lorem Ipsum are printed out any time a new MyBot object is created:
Beta Was this translation helpful? Give feedback.
All reactions