public long GetCurrentIntent(string table) { try { MastersBC mBC = new MastersBC(); long a = mBC.GetCurrentIntent(table); return(a); } catch (Exception ex) { if (ex.ToString().Contains("Cannot insert duplicate key row in object 'dbo.QUEUE' with")) { throw new FaultException("Cannot insert duplicate key in Queue Name."); } throw; } finally { } }