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

Feature/24 #140

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Feature/24 #140

wants to merge 3 commits into from

Conversation

gkgbunny
Copy link
Contributor

@gkgbunny gkgbunny commented May 1, 2019

Logger files
issue-#24 (comment)

@gkgbunny gkgbunny added good first issue Good for newcomers feature New Feature labels May 1, 2019
@gkgbunny gkgbunny self-assigned this May 1, 2019
@@ -0,0 +1,18 @@
const getLocation = (stepInStack = 1) => {
try {
throw new Error('Log stack');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please explain why you have throw error from try block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I want to know the location of file where log statement is used and I got the way is to use of stack and to read the stack I have to throw an error so that it can store it into stack.

Please let me know if I am not able to explain you and I will try again to my best.

try {
throw new Error('Log stack');
} catch (e) {
try {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use try block inside catch block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes we can use, reference- https://social.msdn.microsoft.com/Forums/vstudio/en-US/9981167d-5c82-4d7f-8c83-5348976d940a/try-block-inside-catch-block?forum=clr

Reason why I am using-
whenever stack is full it should throw error.

combine, colorize, simple,
} = format;

const getDetailsFromFile = (fileDetails) => {

Choose a reason for hiding this comment

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

please try to add comments for this kind of functions, it's very unclear why it is required to split and replace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New Feature good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants