[LIB-13] Rename some common classes
[chesshog-scanner.git] / src / main / java / org / hedgecode / chess / scanner / ChessHogScanner.java
index 91a05c8..93c8143 100644 (file)
@@ -66,20 +66,20 @@ public final class ChessHogScanner {
      *
      * @param url URL string for scan.
      * @return PGN game.
-     * @throws ChessHogScannerException Incorrect URL or unknown chess portal.
+     * @throws ScannerException Incorrect URL or unknown chess portal.
      */
-    public static PGNGame scan(String url) throws ChessHogScannerException {
+    public static PGNGame scan(String url) throws ScannerException {
         String hostName;
         try {
             hostName = new URL(url).getHost();
         } catch (MalformedURLException cause) {
-            throw new ChessHogScannerException(
+            throw new ScannerException(
                     String.format("Incorrect  URL: %s", url), cause
             );
         }
         ScannerType type = ScannerType.byHost(hostName);
         if (type == null) {
-            throw new ChessHogScannerException(
+            throw new ScannerException(
                     String.format("Host %s is not among the known for the scanner", hostName)
             );
         }
@@ -100,7 +100,7 @@ public final class ChessHogScanner {
                 initiableScanner.init();
             }
             initScanners.add(type);
-        } catch (ChessHogScannerException e) {
+        } catch (ScannerException e) {
             throw new RuntimeException(e);
         }
     }
@@ -114,7 +114,7 @@ public final class ChessHogScanner {
     }
 
     private ChessHogScanner() {
-        if (!ChessHogScannerProperties.is("scanner.lazy.init")) {
+        if (!ScannerProperties.is("scanner.lazy.init")) {
             init();
         }
     }