Exemple #1
0
        internal static void HandleWarnings(ICreateErrors source, IDbConnection connection)
        {
            VirtuosoErrorCollection      errors = source.CreateErrors();
            VirtuosoInfoMessageEventArgs args   = new VirtuosoInfoMessageEventArgs(errors);

            ((VirtuosoConnection)connection).OnInfoMessage(args);
        }
		internal static void HandleErrors (CLI.ReturnCode returnCode, ICreateErrors source)
		{
			VirtuosoErrorCollection errors = null;
			if (returnCode == CLI.ReturnCode.SQL_ERROR)
				errors = source.CreateErrors ();
			else
				errors = CreateErrors (returnCode);
			throw new VirtuosoException (returnCode, errors);
		}
		internal static void HandleResult (
			CLI.ReturnCode returnCode,
			ICreateErrors source,
			IDbConnection connection)
		{
			if (returnCode == CLI.ReturnCode.SQL_SUCCESS_WITH_INFO)
				HandleWarnings (source, connection);
			else if (returnCode != CLI.ReturnCode.SQL_SUCCESS)
				HandleErrors (returnCode, source);
		}
Exemple #4
0
        internal static void HandleErrors(CLI.ReturnCode returnCode, ICreateErrors source)
        {
            VirtuosoErrorCollection errors = null;

            if (returnCode == CLI.ReturnCode.SQL_ERROR)
            {
                errors = source.CreateErrors();
            }
            else
            {
                errors = CreateErrors(returnCode);
            }
            throw new VirtuosoException(returnCode, errors);
        }
Exemple #5
0
 internal static void HandleResult(
     CLI.ReturnCode returnCode,
     ICreateErrors source,
     IDbConnection connection)
 {
     if (returnCode == CLI.ReturnCode.SQL_SUCCESS_WITH_INFO)
     {
         HandleWarnings(source, connection);
     }
     else if (returnCode != CLI.ReturnCode.SQL_SUCCESS)
     {
         HandleErrors(returnCode, source);
     }
 }
		internal static void HandleWarnings (ICreateErrors source, IDbConnection connection)
		{
			VirtuosoErrorCollection errors = source.CreateErrors ();
			VirtuosoInfoMessageEventArgs args = new VirtuosoInfoMessageEventArgs (errors);
			((VirtuosoConnection)connection).OnInfoMessage (args);
		}