suhas setty

suhas setty

  • NA
  • 128
  • 52.4k

Write 15 lines above and below from where the exception

Jun 29 2015 6:19 AM
Hi ,
 
i am reading the log file,if i found exception from that particular line i have to write 15 lines from that exception line to text file.
 
Example:
 
a
b
b
bgggfgf
sdffs
dfsadfds
adsfdsaf
dsfsdafs
adasdas
sadasdsadas
as
dasdsadsad

adasdsada

sdasdsad
sdsadasdsadas
sdasdsadasd
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
dadasdsad
sdasdsads
System.Reflection.ReflectionTypeLoadException:
sadasdasdasd
dasdasdsad
 
Now i got exception at line no 19  so now i have to copy above 15 lines and below 15 lines.
 

Answers (1)