From 743537497e865b7038b953b454ab3358d632b0f6 Mon Sep 17 00:00:00 2001 From: zhouzihao Date: Tue, 19 May 2026 17:04:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20'W11/exception'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- W11/exception/CrawlerException.java | 11 +++++++++++ W11/exception/NetworkException.java | 11 +++++++++++ W11/exception/ParseException.java | 11 +++++++++++ 3 files changed, 33 insertions(+) create mode 100644 W11/exception/CrawlerException.java create mode 100644 W11/exception/NetworkException.java create mode 100644 W11/exception/ParseException.java diff --git a/W11/exception/CrawlerException.java b/W11/exception/CrawlerException.java new file mode 100644 index 0000000..e81c3c9 --- /dev/null +++ b/W11/exception/CrawlerException.java @@ -0,0 +1,11 @@ +package com.example.datacollect.exception; + +public class CrawlerException extends Exception { + public CrawlerException(String message) { + super(message); + } + + public CrawlerException(String message, Throwable cause) { + super(message, cause); + } +} \ No newline at end of file diff --git a/W11/exception/NetworkException.java b/W11/exception/NetworkException.java new file mode 100644 index 0000000..0fb8e5e --- /dev/null +++ b/W11/exception/NetworkException.java @@ -0,0 +1,11 @@ +package com.example.datacollect.exception; + +public class NetworkException extends CrawlerException { + public NetworkException(String message) { + super(message); + } + + public NetworkException(String message, Throwable cause) { + super(message, cause); + } +} \ No newline at end of file diff --git a/W11/exception/ParseException.java b/W11/exception/ParseException.java new file mode 100644 index 0000000..eaae719 --- /dev/null +++ b/W11/exception/ParseException.java @@ -0,0 +1,11 @@ +package com.example.datacollect.exception; + +public class ParseException extends CrawlerException { + public ParseException(String message) { + super(message); + } + + public ParseException(String message, Throwable cause) { + super(message, cause); + } +} \ No newline at end of file