Le 26/12/2012 00:01, Ian Roper a écrit : > Greetings, > Is there any way to pass the ERROR class as a parameter in a subroutine ? > It always defaults to the Boolean type when used as below > > > Global_Module > Public Sub ManageError(MyError as ERROR) > > Message.Error(MyError.Text & " Occured at " MyError.Class) > //Other error management handling/reporting > End > > Calling from a form or class > > Global_Module.ManageError(ERROR) > > Gambas Error text "Wanted Error, got Boolean instead" > > Cordialemont, > > Ian Roper > Warnbro > Western Australia >
Error is a static class. So there is no need to use it as an argument. ERROR alone is a language keyword that returns TRUE if the last TRY instruction has raised an error. Well, this is not entirely true, but you should use it only in that context! Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user