note 103520 added to class.mongocursorexception

From: Date: Mon, 18 Apr 2011 12:45:29 +0000
Subject: note 103520 added to class.mongocursorexception
Groups: php.notes 
Request: Send a blank email to php-notes+get-178936@lists.php.net to get a copy of this message
As all the exceptions are extending the base Exception class, you can get the code with the getCode() method: <?php try { $collection->insert($duplicate_document, array('safe' => true)); } catch (MongoCursorException $e) { printf("Error code is %d.\n", $e->getCode(); exit(1); } ---- Server IP: 85.214.154.209 Probable Submitter: 80.139.92.194 ---- Manual Page -- http://www.php.net/manual/en/class.mongocursorexception.php Edit -- https://master.php.net/note/edit/103520 Del: integrated -- https://master.php.net/note/delete/103520/integrated Del: useless -- https://master.php.net/note/delete/103520/useless Del: bad code -- https://master.php.net/note/delete/103520/bad+code Del: spam -- https://master.php.net/note/delete/103520/spam Del: non-english -- https://master.php.net/note/delete/103520/non-english Del: in docs -- https://master.php.net/note/delete/103520/in+docs Del: other reasons-- https://master.php.net/note/delete/103520 Reject -- https://master.php.net/note/reject/103520 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#178936) next »