Update Error Handler to give stack trace

Changed throw to wrap exception and give valid stack trace.