Opened 14 years ago

Closed 14 years ago

#99 closed defect (fixed)

Patch: Linker needs to give feedback on failure

Reported by: riftdesign Owned by: gogo
Priority: high Milestone:
Component: Plugin_Linker Version:
Severity: major Keywords:
Cc: Niko <ns@…>

Description

In the case that scan.php returns malformed data, Linker does nothing to respond. When the "Insert Web Link" icon is clicked, nothing happens nor is there a javascript error thrown. It would be beneficial to the developer to know what happened. It would be helpful for the user to know that something isn't working correctly.

Change History (6)

comment:1 Changed 14 years ago by Niko <ns@…>

  • Owner changed from gogo to Niko <ns@…>

godd idea, i will implement this next week...

comment:2 Changed 14 years ago by Niko <ns@…>

  • Owner changed from Niko <ns@…> to anonymous
  • Status changed from new to assigned

comment:3 Changed 14 years ago by Niko <ns@…>

  • Owner changed from anonymous to Niko <ns@…>
  • Status changed from assigned to new

comment:4 Changed 14 years ago by Niko <ns@…>

  • Owner changed from Niko <ns@…> to gogo
  • Summary changed from Linker needs to give feedback on failure to Patch: Linker needs to give feedback on failure

Patch (#67 is allready applied)

Index: linker.js
===================================================================
--- linker.js   (Revision 54)
+++ linker.js   (Arbeitskopie)
@@ -315,7 +315,14 @@
     {
         //get files from backend
         HTMLArea._getback(linker.lConfig.backend,
-                          function(txt) { lDialog.files = eval(txt); lDialog._prepareDialog(); });
+                          function(txt) {
+                            try {
+                                lDialog.files = eval(txt);
+                            } catch(Error) {
+                                alert('Error loading '+linker.lConfig.backend+':\n'+Error.toString());
+                                lDialog.files = [ {url:'',title:Error.toString()} ];
+                            }
+                            lDialog._prepareDialog(); });
     }
     else if(linker.lConfig.files != null)
     {

...don't know whats best here, either we use the alert, or we just display the error-message in the tree (one line should be removed)

comment:5 Changed 14 years ago by anonymous

  • Cc Niko <ns@…> added

comment:6 Changed 14 years ago by niko

  • Resolution set to fixed
  • Status changed from new to closed

commited this patch as changeset:57, additional info about syntax in wiki:Linker?

Note: See TracTickets for help on using tickets.