You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Please add support onError action/event in server side code #359
There is no action/event to handle errors in a custom way at server side.
There is a property "Log" (in Devart.Data.Linq.DataContext) for logging statements etc. but nothing which is fired in error case.
I use it in this way:
DataSourceLoader.Load(IQueryable, DataSourceLoadOptions)
The IQueryable is executed out of controller scope, so I cannot add a simple try-catch, because the IQueryable is executed in DevExpress logic or while serializing.
I hope it's understandable.
Thank you for your help. I implemented the executing of the Queryable. In my case I could not execute the query in all cases, because the "IsCountQuery"-request throws an exception. So in future, it would be nice to have a possiblity to add a logger function.
Activity
AlekseyMartynov commentedon Jun 17, 2019
You can catch and handle server errors using a
try-catchblock:hype11 commentedon Jun 25, 2019
I use it in this way:
DataSourceLoader.Load(IQueryable, DataSourceLoadOptions)
The IQueryable is executed out of controller scope, so I cannot add a simple try-catch, because the IQueryable is executed in DevExpress logic or while serializing.
I hope it's understandable.
AlekseyMartynov commentedon Jun 25, 2019
Now I understand that you need to catch exceptions that occur during the delayed enumeration of the result.
Possible solutions:
1. Force JSON serialization
2. Force enumeration (feature request #347)
hype11 commentedon Jun 27, 2019
Thank you for your help. I implemented the executing of the Queryable. In my case I could not execute the query in all cases, because the "IsCountQuery"-request throws an exception. So in future, it would be nice to have a possiblity to add a logger function.
AlekseyMartynov commentedon Jul 1, 2019
Thank you. I updated the code snippets. Now they handle
IsCountQueryerrors, too.