# How to handle call to undefined method

**URL:** <https://forum.kirupa.com/t/how-to-handle-call-to-undefined-method/44184>\
**Category:** flash\
**Created:** [March 1, 2004, 1:18pm UTC](https://forum.kirupa.com/t/how-to-handle-call-to-undefined-method/44184 "2004-03-01T13:18:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaKa](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@MaKa](https://forum.kirupa.com/u/MaKa)\
**Post date:** [March 1, 2004, 1:18pm UTC](https://forum.kirupa.com/t/how-to-handle-call-to-undefined-method/44184/1 "2004-03-01T13:18:14Z")

</div>

Hi there,

I see that is possible with NetServices call a function that has not been defined, like this.

[AS]  
con = NetServices.createGatewayConnection(url);  
service = con.getService(serviceName, responder);

service.getAnyMethod(10,20); // here I call getAnyMethod that has never been defined.  
[/AS]

My question is:

How can I handle a call to getAnyMethod if it doesn’t exist?

in PHP it’s called overload. Converting it to flash, would be like this:

[AS]  
class AnyClass{  
function \_\_call(m, a){  
// m is the method name  
// a are the parameters  
}  
}  
[/AS]
