[Box Backup-commit] COMMIT r3616 - box/trunk/lib/server

subversion at boxbackup.org subversion at boxbackup.org
Thu Aug 6 22:20:48 BST 2015


Author: chris
Date: 2015-08-06 21:20:48 +0000 (Thu, 06 Aug 2015)
New Revision: 3616

Modified:
   box/trunk/lib/server/makeprotocol.pl.in
Log:
Handle generic exceptions by returning an Error message with correct Type.

Modified: box/trunk/lib/server/makeprotocol.pl.in
===================================================================
--- box/trunk/lib/server/makeprotocol.pl.in	2015-08-06 21:20:40 UTC (rev 3615)
+++ box/trunk/lib/server/makeprotocol.pl.in	2015-08-06 21:20:48 UTC (rev 3616)
@@ -331,7 +331,9 @@
 	{
 		$error_message = $cmd;
 		my ($mem_type,$mem_subtype) = split /,/,obj_get_type_params($cmd,'IsError');
+		my $error_type = $cmd_constants{"ErrorType"};
 		print H <<__E;
+	$cmd_class(int SubType) : m$mem_type($error_type), m$mem_subtype(SubType) { }
 	bool IsError(int &rTypeOut, int &rSubTypeOut) const;
 	std::string GetMessage() const { return GetMessage(m$mem_subtype); };
 	static std::string GetMessage(int subtype);
@@ -1102,7 +1104,7 @@
 			// or the exception handler fails as well. This path
 			// throws the exception upwards, killing the process
 			// that handles the current client.
-			Send($cmd_classes{$error_message}());
+			Send($cmd_classes{$error_message}(-1));
 			throw;
 		}
 




More information about the Boxbackup-commit mailing list