Page Menu
Home
GitPull.it
Search
Configure Global Search
Log In
Files
F13546469
D21.1783155666.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Authored By
Unknown
Size
862 B
Referenced Files
None
Subscribers
None
D21.1783155666.diff
View Options
diff --git a/bot.php b/bot.php
--- a/bot.php
+++ b/bot.php
@@ -106,13 +106,24 @@
}
$stats = implode( ", ", $stats );
-$wit->login();
-$wit->edit( [
- 'title' => MARKADMINS_PAGE,
- 'summary' => "Bot: aggiornamento elenco utenti: $stats",
- 'text' => json_encode( [ 'legend' => $LEGEND, 'users' => $users ] ),
- 'contentformat' => 'application/json',
- 'bot' => 1,
-] );
+try {
+
+ $wit->login();
+
+ $wit->edit( [
+ 'title' => MARKADMINS_PAGE,
+ 'summary' => "Bot: aggiornamento elenco utenti: $stats",
+ 'text' => json_encode( [ 'legend' => $LEGEND, 'users' => $users ] ),
+ 'contentformat' => 'application/json',
+ 'bot' => 1,
+ ] );
+
+} catch( Exception $e ) {
+
+ \cli\Log::error( sprintf(
+ "something bad happened: %s",
+ $e->getMessage()
+ ) );
+}
\cli\Log::info( $stats );
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 4, 11:01 (12 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1987512
Default Alt Text
D21.1783155666.diff (862 B)
Attached To
Mode
D21: catch login fails and other strange behaviours
Attached
Detach File
Event Timeline