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
I'm not quite sure if I should post this to the forum or post it here, but I think it is a feature request, so here goes...
I'm trying PLUpload 2.1(.1), but cannot seem to catch certain Flash errors. I tried a lot of debugging and adding code, but I cannot get enough grasp on the code because of my lack of experience with Flash development and moxie internals. :-o
I would like to have Flash I/O Error # 2038 and Error # 1000 (out of memory) captured by moxie, and then routed through to plupload and jquery.ui.plupload, just like plupload.HTTP_ERROR eventually gets handled to output an error message, when the receiving server isn't listening.
Error # 1000 gets thrown when clicking on the upload button, trying to chunk-upload a file that is too large for Flash to handle at that moment (for instance a 2 GB file). Then I would like to see the same error message as for IMAGE_MEMORY_ERROR, 'Runtime ran out of available memory.'. Now the file just stays in the queue, looking as if it is still processing.
Error # 2038 gets thrown after selecting a file that is larger than uint.MAX_VALUE (cq Number, 4294967295), on the following code lines:
flash.net::FileReference/get size()
at com::Blob()[D:\Users\user\Documents\GitHub\moxie\src\flash\src\com\Blob.as:62]
at com::File()[D:\Users\user\Documents\GitHub\moxie\src\flash\src\com\File.as:36]
at com::FileInput/onDialogEvent()[D:\Users\user\Documents\GitHub\moxie\src\flash\src\com\FileInput.as:150]
I think this error could be best handled in onDialogEvent, but I don't have enough experience in Flash development to implement it properly.
So I added an uncaughtErrorHandler in Moxie.as (ugly, but I had to try something) like so:
private function uncaughtErrorHandler(event:UncaughtErrorEvent):void
{
if (event.error is Error)
{
var error:Error = event.error as Error;
_fireEvent(uid + "::Exception", { name: getQualifiedClassName(error).replace(/^[^:*]::/, ''), code: error.errorID });
}
else if (event.error is ErrorEvent)
{
var errorEvent:ErrorEvent = event.error as ErrorEvent;
_fireEvent(uid + "::Exception", { name: getQualifiedClassName(errorEvent).replace(/^[^:*]::/, ''), code: errorEvent.errorID } );
}
else
{
// a non-Error, non-ErrorEvent type was thrown and uncaught
}
}
Then I tried capturing the exceptions in RuntimeClient.js (moxie.js), line 72, the commented line:
/*runtime.bind('Exception', function() { });*/
which probably also isn't a good idea since it is commented out...
I do get those two exceptions # 2038 and # 1000 in this anonymous function (in argument 2), but I don't know handle it further to get it passed to jquery.ui.plupload. I tried lots of trigger('Error') / RuntimeError etc, but I realise I'm kind of fooling around trying, not having enough experience.
I've used plupload 1.5.7 previously, and this could handle Flash error 2038 more how I would want it, adding an error on top of the widget.
Davit, could you please shed your light on how to handle these Flash errors? I understand this might not be an easy task, for me it sure isn't (I'm trying hard the last few days, to no avail :-/ ) but I'm hoping you have some time to investigate.
If you require more information, please say so and I will try to provide it.
Erik Jan
The text was updated successfully, but these errors were encountered:
Hello,
I'm not quite sure if I should post this to the forum or post it here, but I think it is a feature request, so here goes...
I'm trying PLUpload 2.1(.1), but cannot seem to catch certain Flash errors. I tried a lot of debugging and adding code, but I cannot get enough grasp on the code because of my lack of experience with Flash development and moxie internals. :-o
I would like to have Flash I/O Error # 2038 and Error # 1000 (out of memory) captured by moxie, and then routed through to plupload and jquery.ui.plupload, just like plupload.HTTP_ERROR eventually gets handled to output an error message, when the receiving server isn't listening.
Error # 1000 gets thrown when clicking on the upload button, trying to chunk-upload a file that is too large for Flash to handle at that moment (for instance a 2 GB file). Then I would like to see the same error message as for IMAGE_MEMORY_ERROR, 'Runtime ran out of available memory.'. Now the file just stays in the queue, looking as if it is still processing.
Error # 2038 gets thrown after selecting a file that is larger than uint.MAX_VALUE (cq Number, 4294967295), on the following code lines:
I think this error could be best handled in onDialogEvent, but I don't have enough experience in Flash development to implement it properly.
So I added an uncaughtErrorHandler in Moxie.as (ugly, but I had to try something) like so:
and in _init, adding the line:
Then I tried capturing the exceptions in RuntimeClient.js (moxie.js), line 72, the commented line:
which probably also isn't a good idea since it is commented out...
I do get those two exceptions # 2038 and # 1000 in this anonymous function (in argument 2), but I don't know handle it further to get it passed to jquery.ui.plupload. I tried lots of trigger('Error') / RuntimeError etc, but I realise I'm kind of fooling around trying, not having enough experience.
I've used plupload 1.5.7 previously, and this could handle Flash error 2038 more how I would want it, adding an error on top of the widget.
Davit, could you please shed your light on how to handle these Flash errors? I understand this might not be an easy task, for me it sure isn't (I'm trying hard the last few days, to no avail :-/ ) but I'm hoping you have some time to investigate.
If you require more information, please say so and I will try to provide it.
Erik Jan
The text was updated successfully, but these errors were encountered: