package com.bugsnag.example.servlet;

import com.bugsnag.Bugsnag;
import com.bugsnag.Severity;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class ExampleServlet extends HttpServlet {
    private Bugsnag bugsnag;

    /**
     * Simple servlet example
     */
    public ExampleServlet() {
        bugsnag = new Bugsnag("YOUR-API-KEY");
        bugsnag.setProjectPackages("com.bugsnag.example");
    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        // Send a handled exception to Bugsnag
//        try {
//            throw new RuntimeException("Handled exception - default severity");
//        } catch (RuntimeException e) {
//            bugsnag.notify(e);
//        }
//
//        // Send a handled exception to Bugsnag with info severity
//        try {
//            throw new RuntimeException("Handled exception - INFO severity");
//        } catch (RuntimeException ex) {
//            bugsnag.notify(ex, Severity.INFO);
//        }
//
//        // Throw an exception - not automatically reported so must be handled by the error handler
//        throw new ServletException("Servlet exception");
    }
}

@@ -686,18 +686,16 @@
 ption %7B%0A
-//
         
@@ -733,18 +733,16 @@
 Bugsnag%0A
-//
         
@@ -739,34 +739,32 @@
 g%0A        try %7B%0A
-//
             thro
@@ -819,34 +819,32 @@
 ult severity%22);%0A
-//
         %7D catch 
@@ -862,26 +862,24 @@
 eption e) %7B%0A
-//
             
@@ -897,18 +897,16 @@
 ify(e);%0A
-//
         
@@ -899,37 +899,33 @@
 y(e);%0A        %7D%0A
-//%0A//
+%0A
         // Send 
@@ -974,18 +974,16 @@
 everity%0A
-//
         
@@ -988,18 +988,16 @@
   try %7B%0A
-//
         
@@ -1065,18 +1065,16 @@
 rity%22);%0A
-//
         
@@ -1105,18 +1105,16 @@
 n ex) %7B%0A
-//
         
@@ -1152,18 +1152,16 @@
 .INFO);%0A
-//
         
@@ -1166,13 +1166,9 @@
   %7D%0A
-//%0A//
+%0A
     
@@ -1262,18 +1262,16 @@
 handler%0A
-//
         

remove deletion of example servlet