210 exception handling improvement
This commit is contained in:
+12
-3
@@ -457,14 +457,23 @@
|
|||||||
<cfquery name="local.qGetUserInfo">
|
<cfquery name="local.qGetUserInfo">
|
||||||
select u.usr_id, c.contragent_id, c.contract_id, s.specification_id
|
select u.usr_id, c.contragent_id, c.contract_id, s.specification_id
|
||||||
from usr u
|
from usr u
|
||||||
join contract c on (u.contragent_id=c.contragent_id)
|
left outer join contract c on (u.contragent_id=c.contragent_id)
|
||||||
join specification s on (c.contract_id=s.contract_id)
|
left outer join specification s on (c.contract_id=s.contract_id)
|
||||||
where u.idp_usr_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.usrUid#" null=#!isValid('guid',arguments.usrUid)#/>
|
where u.idp_usr_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.usrUid#" null=#!isValid('guid',arguments.usrUid)#/>
|
||||||
order by s.specification_id desc
|
order by s.specification_id desc
|
||||||
limit 1;
|
limit 1;
|
||||||
</cfquery>
|
</cfquery>
|
||||||
<cfif local.qGetUserInfo.recordCount EQ 0>
|
<cfif local.qGetUserInfo.recordCount EQ 0>
|
||||||
<cfthrow message="User Not Found in CMDB" detail="User with uuid=(#arguments.contragentUid#) not found in CMDB"/>
|
<cfthrow message="User Not Found in CMDB" detail="User with uuid=(#arguments.usrUid#) not found in CMDB"/>
|
||||||
|
</cfif>
|
||||||
|
<cfif !len(local.qGetUserInfo.contragent_id)>
|
||||||
|
<cfthrow message="User is not mapped to Contragent in CMDB" detail="Contragent for user with uuid=(#arguments.usrUid#) not found in CMDB"/>
|
||||||
|
</cfif>
|
||||||
|
<cfif !len(local.qGetUserInfo.contract_id)>
|
||||||
|
<cfthrow message="Contract for user not found in CMDB" detail="Contract for user with uuid=(#arguments.usrUid#) not found in CMDB"/>
|
||||||
|
</cfif>
|
||||||
|
<cfif !len(local.qGetUserInfo.specification_id)>
|
||||||
|
<cfthrow message="Specification for user not found in CMDB" detail="Specification for user with uuid=(#arguments.usrUid#) not found in CMDB"/>
|
||||||
</cfif>
|
</cfif>
|
||||||
|
|
||||||
<!--- <cfdump var=#local.qGetCustomerInfo#/><cfabort/> --->
|
<!--- <cfdump var=#local.qGetCustomerInfo#/><cfabort/> --->
|
||||||
|
|||||||
Reference in New Issue
Block a user