-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: develop
Are you sure you want to change the base?
Feature/24 #140
Conversation
@@ -0,0 +1,18 @@ | |||
const getLocation = (stepInStack = 1) => { | |||
try { | |||
throw new Error('Log stack'); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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
Logger files
issue-#24 (comment)