Feature SS-162
2 votes

Robust handling of custom regions

Created by Martin Kraska on 6/17/2014 12:11 AM Last Updated by Martin Kraska on 9/14/2020 12:55 AM
%
 (hrs)
Logged: 0   (hrs)

 Description

Currently, SMath cannot read files if any of the custom regions cannot handle the stored data (e.g. due do some unresolved dependencies). Sometimes, you just cannot or do not want to update plugins. Currently, this can lead to complete failure to open files containing such regions, combined with a nearly useless error message:

The proposal is

  • To provide a useful error message stating the region type, the plugin to blame and the input line that causes the problem. Then, at least the more experienced smaticians have a chance of identifying and removing such regions. -
  • Better: to offer skipping the corrupt region but still keeping the data. At least the location should be readable in any case, such that a dummy representation containing some error message could be provided. In Python, I would perhaps wrap the read statement in a try-except-clause.

An example is the attached handbook page. It uses an image region which is not available at the online gallery. Thus users with other than the inofficial portable distribution have no chance to open the file. You might argue that the mitigation would be to put the image region to the gallery. However, there might be multiple other  reasons for such inconsistencies that the user might not immediately be able to resolve.

 

 

    Martin Kraska (Monday, September 14, 2020 12:55 AM) #

I think that this is nearly resolved, except for red-cross-regions not displaying what plugin is actually missing.

    Martin Kraska (Tuesday, August 15, 2017 12:47 PM) #

Opening of files with unknown plugins and their regions now works. Regions with missing handling show up as crossed red rectange.

I propose to add a message which type of region (according to Insert menu) that would be and what plugin should provide it.