@@ -370,7 +370,7 @@ public RetryWhenContainsHandler(params string[] contents)
370
370
{
371
371
if ( contents == null || contents . Length == 0 )
372
372
{
373
- throw new SpiderException ( "contents should not be empty/null. " ) ;
373
+ throw new SpiderException ( "contents should not be empty/null" ) ;
374
374
}
375
375
376
376
_contents = contents ;
@@ -468,7 +468,7 @@ public RedialWhenExceptionThrowHandler(string exceptionMessage)
468
468
{
469
469
if ( string . IsNullOrWhiteSpace ( exceptionMessage ) )
470
470
{
471
- throw new SpiderException ( "exceptionMessage should not be null or empty. " ) ;
471
+ throw new SpiderException ( "exceptionMessage should not be null or empty" ) ;
472
472
}
473
473
474
474
_exceptionMessage = exceptionMessage ;
@@ -521,10 +521,10 @@ public class RedialAndUpdateCookiesWhenContainsHandler : AfterDownloadCompleteHa
521
521
/// <param name="contents">包含的内容(specified contents)</param>
522
522
public RedialAndUpdateCookiesWhenContainsHandler ( ICookieInjector cookieInjector , params string [ ] contents )
523
523
{
524
- _cookieInjector = cookieInjector ?? throw new SpiderException ( "cookieInjector should not be null. " ) ;
524
+ _cookieInjector = cookieInjector ?? throw new SpiderException ( "cookieInjector should not be null" ) ;
525
525
if ( contents == null || contents . Length == 0 )
526
526
{
527
- throw new SpiderException ( "contents should not be null or empty. " ) ;
527
+ throw new SpiderException ( "contents should not be null or empty" ) ;
528
528
}
529
529
530
530
_contents = contents ;
@@ -616,7 +616,7 @@ public override void Handle(ref Page page, IDownloader downloader, ISpider spide
616
616
617
617
if ( begin < 0 )
618
618
{
619
- throw new SpiderException ( $ "Cutout failed, can not find begin string: { _startPart } . ") ;
619
+ throw new SpiderException ( $ "Cutout failed, can not find begin string: { _startPart } ") ;
620
620
}
621
621
622
622
int end = rawText . IndexOf ( _endPart , begin , StringComparison . Ordinal ) ;
@@ -629,7 +629,7 @@ public override void Handle(ref Page page, IDownloader downloader, ISpider spide
629
629
630
630
if ( begin < 0 || length < 0 )
631
631
{
632
- throw new SpiderException ( "Cutout failed. Please check your settings. " ) ;
632
+ throw new SpiderException ( "Cutout failed. Please check your settings" ) ;
633
633
}
634
634
635
635
string newRawText = rawText . Substring ( begin , length ) . Trim ( ) ;
0 commit comments