0
samara081 created
Please help me how to catch exception if i call service from mvc controller? if i do that my code never enter catch section in Application service but if i call sevice from java script directly all thing is ok, all my need is to not call service from javascript to catch exception
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
7 Answer(s)
-
0
What exception?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
in last statement before try block , number 2 is wrong to try entring in catch, it is foreign key reference so i provide the Id not exist in database
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
And you're saying DB inserts non-existing foreign key when called from controller?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
no, it is not insert and not enter the catch for this error
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Then what happens?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
nothing all i need to let my code to enter to catch bloack and set error message to be shown to user
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
i solve it thank you
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)


