TeamTalk 5 .NET DLL  Version 5.14A
Client Error Handling

This section explains how to handle errors occuring in the client instance or as a result of server commands. More...

Classes

struct  BearWare.ClientErrorMsg
 

Enumerations

enum class  BearWare.ClientError : uint {
  BearWare.CMDERR_SUCCESS = 0 , BearWare.SUCCESS = 0 , BearWare.CMDERR_SYNTAX_ERROR = 1000 , BearWare.CMDERR_UNKNOWN_COMMAND = 1001 ,
  BearWare.CMDERR_MISSING_PARAMETER = 1002 , BearWare.CMDERR_INCOMPATIBLE_PROTOCOLS = 1003 , BearWare.CMDERR_UNKNOWN_AUDIOCODEC = 1004 , BearWare.CMDERR_INVALID_USERNAME = 1005 ,
  BearWare.CMDERR_INCORRECT_SERVER_PASSWORD = 2000 , BearWare.CMDERR_INCORRECT_CHANNEL_PASSWORD = 2001 , BearWare.CMDERR_INVALID_ACCOUNT = 2002 , BearWare.CMDERR_MAX_SERVER_USERS_EXCEEDED = 2003 ,
  BearWare.CMDERR_MAX_CHANNEL_USERS_EXCEEDED = 2004 , BearWare.CMDERR_SERVER_BANNED = 2005 , BearWare.CMDERR_NOT_AUTHORIZED = 2006 , BearWare.CMDERR_MAX_DISKUSAGE_EXCEEDED = 2008 ,
  BearWare.CMDERR_INCORRECT_OP_PASSWORD = 2010 , BearWare.CMDERR_AUDIOCODEC_BITRATE_LIMIT_EXCEEDED = 2011 , BearWare.CMDERR_MAX_LOGINS_PER_IPADDRESS_EXCEEDED = 2012 , BearWare.CMDERR_MAX_CHANNELS_EXCEEDED = 2013 ,
  BearWare.CMDERR_COMMAND_FLOOD = 2014 , BearWare.CMDERR_CHANNEL_BANNED = 2015 , BearWare.CMDERR_NOT_LOGGEDIN = 3000 , BearWare.CMDERR_ALREADY_LOGGEDIN = 3001 ,
  BearWare.CMDERR_NOT_IN_CHANNEL = 3002 , BearWare.CMDERR_ALREADY_IN_CHANNEL = 3003 , BearWare.CMDERR_CHANNEL_ALREADY_EXISTS = 3004 , BearWare.CMDERR_CHANNEL_NOT_FOUND = 3005 ,
  BearWare.CMDERR_USER_NOT_FOUND = 3006 , BearWare.CMDERR_BAN_NOT_FOUND = 3007 , BearWare.CMDERR_FILETRANSFER_NOT_FOUND = 3008 , BearWare.CMDERR_OPENFILE_FAILED = 3009 ,
  BearWare.CMDERR_ACCOUNT_NOT_FOUND = 3010 , BearWare.CMDERR_FILE_NOT_FOUND = 3011 , BearWare.CMDERR_FILE_ALREADY_EXISTS = 3012 , BearWare.CMDERR_FILESHARING_DISABLED = 3013 ,
  BearWare.CMDERR_CHANNEL_HAS_USERS = 3015 , BearWare.CMDERR_LOGINSERVICE_UNAVAILABLE = 3016 , BearWare.CMDERR_CHANNEL_CANNOT_BE_HIDDEN = 3017 , BearWare.INTERR_SNDINPUT_FAILURE = 10000 ,
  BearWare.INTERR_SNDOUTPUT_FAILURE = 10001 , BearWare.INTERR_AUDIOCODEC_INIT_FAILED = 10002 , BearWare.INTERR_SPEEXDSP_INIT_FAILED = 10003 , BearWare.INTERR_AUDIOPREPROCESSOR_INIT_FAILED = 10003 ,
  BearWare.INTERR_TTMESSAGE_QUEUE_OVERFLOW = 10004 , BearWare.INTERR_SNDEFFECT_FAILURE = 10005
}
 Errors which can occur either as a result of client commands or as a result of internal errors. More...
 

Functions

static string BearWare.TeamTalkBase.GetErrorMessage (ClientError nError)
 Get textual discription of an error message. More...
 

Detailed Description

This section explains how to handle errors occuring in the client instance or as a result of server commands.

There are two types errors which can occur in the client, either server command error or internal errors. Section Client/Server Commands describes all the commands a client can issue to a server. If a server commands fails the client instance notifies the user application through the event TeamTalkBase.OnCmdError(). An example of a server command error could be to issue the TeamTalkBase.DoLogin() command with an incorrect password. The server will in this case respond with the error ClientError.CMDERR_INVALID_ACCOUNT. The user application must be designed to process these errors so application users can be notified of errors.

Internal errors are errors due to failing devices. Currently only two such errors exist ClientError.INTERR_SNDINPUT_FAILURE and ClientError.INTERR_SNDOUTPUT_FAILURE.

Enumeration Type Documentation

◆ ClientError

enum BearWare.ClientError : uint
strong

Errors which can occur either as a result of client commands or as a result of internal errors.

Use TeamTalkBase.GetErrorMessage() to get a text-description of the error.

Enumerator
CMDERR_SUCCESS 

Command indicating success.

SUCCESS 
CMDERR_SYNTAX_ERROR 

Command has syntax error. Only used internally.

CMDERR_UNKNOWN_COMMAND 

The server doesn't support the issued command.

   This error may occur if the server is an older version than
   the client instance. 
CMDERR_MISSING_PARAMETER 

Command cannot be performed due to missing parameter. Only used internally.

CMDERR_INCOMPATIBLE_PROTOCOLS 

The server uses a protocol which is incompatible with the client instance.

CMDERR_UNKNOWN_AUDIOCODEC 

The server does not support the audio codec specified by the client. Introduced in version 4.1.0.1264.

See also
TeamTalkBase.DoMakeChannel()
TeamTalkBase.DoJoinChannel()
CMDERR_INVALID_USERNAME 

Invalid username for BearWare.UserAccount.

See also
TeamTalkBase.DoNewUserAccount()
CMDERR_INCORRECT_SERVER_PASSWORD 

Invalid server password.

   The TeamTalkBase.DoLogin() command passed a server password which was
   invalid.  @see TeamTalkBase.DoLogin 
CMDERR_INCORRECT_CHANNEL_PASSWORD 

Invalid channel password.

   The TeamTalkBase.DoJoinChannel() or TeamTalkBase.DoJoinChannel()ByID passed an
   invalid channel password. TeamTalkBase.DoMakeChannel() can also cause
   a this error if the password is longer than #BearWare.TeamTalkBase.TT_STRLEN. 
CMDERR_INVALID_ACCOUNT 

Invalid username or password for account.

   The TeamTalkBase.DoLogin() command was issued with invalid account
   properties. This error can also occur by
   TeamTalkBase.DoNewUserAccount() if username is empty. 
CMDERR_MAX_SERVER_USERS_EXCEEDED 

Login failed due to maximum number of users on server.

TeamTalkBase.DoLogin() failed because the server does not allow any more users.

CMDERR_MAX_CHANNEL_USERS_EXCEEDED 

Cannot join channel because it has maximum number of users.

TeamTalkBase.DoJoinChannel() or TeamTalkBase.DoJoinChannel()ByID failed because no more users are allowed in the channel.

CMDERR_SERVER_BANNED 

IP-address has been banned from server.

   TeamTalkBase.DoLogin() failed because the local client's IP-address
   has been banned on the server. 
CMDERR_NOT_AUTHORIZED 

Command not authorized.

   The command cannot be performed because the client instance
   has insufficient rights.

   @see TeamTalkBase.DoDeleteFile
   @see TeamTalkBase.DoJoinChannel
   @see TeamTalkBase.DoJoinChannelByID
   @see TeamTalkBase.DoLeaveChannel
   @see TeamTalkBase.DoChannelOp
   @see TeamTalkBase.DoChannelOpEx
   @see TeamTalkBase.DoKickUser
   @see TeamTalkBase.DoUpdateChannel
   @see TeamTalkBase.DoChangeNickname
   @see TeamTalkBase.DoChangeStatus
   @see TeamTalkBase.DoTextMessage
   @see TeamTalkBase.DoSubscribe
   @see TeamTalkBase.DoUnsubscribe
   @see TeamTalkBase.DoMakeChannel
   @see TeamTalkBase.DoRemoveChannel
   @see TeamTalkBase.DoMoveUser
   @see TeamTalkBase.DoUpdateServer
   @see TeamTalkBase.DoSaveConfig
   @see TeamTalkBase.DoSendFile 
   @see TeamTalkBase.DoRecvFile 
   @see TeamTalkBase.DoBanUser
   @see TeamTalkBase.DoUnBanUser
   @see TeamTalkBase.DoListBans
   @see TeamTalkBase.DoListUserAccounts
   @see TeamTalkBase.DoNewUserAccount
   @see TeamTalkBase.DoDeleteUserAccount 
CMDERR_MAX_DISKUSAGE_EXCEEDED 

Cannot upload file because disk quota will be exceeded.

   TeamTalkBase.DoSendFile() was not allowed because there's not enough
   disk space available for upload.

   @see Channel 
CMDERR_INCORRECT_OP_PASSWORD 

Invalid password for becoming channel operator.

   The password specified in TeamTalkBase.DoChannelOpEx() is not correct.
   The operator password is the @a szOpPassword of the 
   #BearWare.Channel-struct. 
CMDERR_AUDIOCODEC_BITRATE_LIMIT_EXCEEDED 

The selected BearWare.AudioCodec exceeds what the server allows.

A server can limit the vitrate of audio codecs if nAudioCodecBpsLimit of BearWare.ServerProperties is specified.

CMDERR_MAX_LOGINS_PER_IPADDRESS_EXCEEDED 

The maximum number of logins allowed per IP-address has been exceeded.

See also
ServerProperties
TeamTalkBase.DoLogin()
CMDERR_MAX_CHANNELS_EXCEEDED 

The maximum number of channels has been exceeded.

See also
TT_CHANNELID_MAX
CMDERR_COMMAND_FLOOD 

Command flooding prevented by server.

   Commands are issued faster than allowed by the server. See
   #BearWare.UserAccount @c commandsPerMSec.  @see TT_CHANNELID_MAX 
CMDERR_CHANNEL_BANNED 

Banned from joining a channel.

   @see TeamTalkBase.DoJoinChannel()
   @see TeamTalkBase.DoJoinChannelByID()
   @see TeamTalkBase.DoBanUser() 
CMDERR_NOT_LOGGEDIN 

Client instance has not been authenticated.

   TeamTalkBase.DoLogin() has not been issued successfully or
   TeamTalkBase.DoLogout() could not be performed because client
   instance is already logged in.
CMDERR_ALREADY_LOGGEDIN 

Already logged in.

   TeamTalkBase.DoLogin() cannot be performed twice. 
CMDERR_NOT_IN_CHANNEL 

Cannot leave channel because not in channel.

   TeamTalkBase.DoLeaveChannel() failed because user is not in a channel. 
CMDERR_ALREADY_IN_CHANNEL 

Cannot join same channel twice.

   TeamTalkBase.DoJoinChannel() or TeamTalkBase.DoJoinChannel()ByID failed because
   client instance is already in the specified channel. 
CMDERR_CHANNEL_ALREADY_EXISTS 

Channel already exists.

   TeamTalkBase.DoMakeChannel() failed because channel already exists. 
CMDERR_CHANNEL_NOT_FOUND 

Channel does not exist.

   Command failed because channel does not exists.
   @see TeamTalkBase.DoRemoveChannel
   @see TeamTalkBase.DoUpdateChannel
   @see TeamTalkBase.DoMakeChannel Due to invalid channel name
   @see TeamTalkBase.DoSendFile
   @see TeamTalkBase.DoRecvFile
   @see TeamTalkBase.DoDeleteFile
   @see TeamTalkBase.DoJoinChannel
   @see TeamTalkBase.DoJoinChannelByID
   @see TeamTalkBase.DoLeaveChannel
   @see TeamTalkBase.DoChannelOp
   @see TeamTalkBase.DoKickUser
   @see TeamTalkBase.DoBanUser
   @see TeamTalkBase.DoMoveUser
   @see TeamTalkBase.DoTextMessage 
CMDERR_USER_NOT_FOUND 

User not found.

   Command failed because user does not exists.
   @see TeamTalkBase.DoChannelOp
   @see TeamTalkBase.DoKickUser
   @see TeamTalkBase.DoBanUser
   @see TeamTalkBase.DoMoveUser
   @see TeamTalkBase.DoTextMessage
   @see TeamTalkBase.DoSubscribe
   @see TeamTalkBase.DoUnsubscribe 
CMDERR_BAN_NOT_FOUND 

Banned IP-address does not exist.

   TeamTalkBase.DoUnBanUser() failed because there is no banned
   IP-address which matches what was specified. 
CMDERR_FILETRANSFER_NOT_FOUND 

File transfer doesn't exists.

   TeamTalkBase.DoSendFile() or TeamTalkBase.DoRecvFile() failed because the server
   cannot process the file transfer. 
CMDERR_OPENFILE_FAILED 

Server failed to open file.

   TeamTalkBase.DoSendFile() or TeamTalkBase.DoRecvFile() failed because the server
   cannot open the specified file (possible file lock). 
CMDERR_ACCOUNT_NOT_FOUND 

Cannot find user account.

   TeamTalkBase.DoDeleteUserAccount() failed because the specified user
   account does not exists. 
CMDERR_FILE_NOT_FOUND 

File does not exist.

   TeamTalkBase.DoSendFile(), TeamTalkBase.DoRecvFile() or TeamTalkBase.DoDeleteFile() failed
   because the server cannot find the specified file. 
CMDERR_FILE_ALREADY_EXISTS 

File already exist.

   TeamTalkBase.DoSendFile() failed because the file already exists in
   the channel. 
CMDERR_FILESHARING_DISABLED 

Server does not allow file transfers.

   TeamTalkBase.DoSendFile() or TeamTalkBase.DoRecvFile() failed because the server
   does not allow file transfers. 
CMDERR_CHANNEL_HAS_USERS 

Cannot process command since channel is not empty.

See also
TeamTalkBase.DoUpdateChannel() BearWare.AudioCodec cannot be changed while there are User Properties in a channel.
CMDERR_LOGINSERVICE_UNAVAILABLE 

The login service is currently unavailable.

   Added in TeamTalk v5.3 to support web-logins. 
CMDERR_CHANNEL_CANNOT_BE_HIDDEN 

Cannot apply ChannelType.CHANNEL_HIDDEN to BearWare.Channel's channel type.

   A hidden channel cannot contain subchannels or have it
   #ChannelType.CHANNEL_HIDDEN property toggled. 
INTERR_SNDINPUT_FAILURE 

A sound input device failed.

   This can e.g. happen when joining a channel and the sound
   device has been unplugged. 
INTERR_SNDOUTPUT_FAILURE 

A sound output device failed.

   This can e.g. happen when joining a channel and the sound
   device has been unplugged. 
INTERR_AUDIOCODEC_INIT_FAILED 

Audio codec used by channel failed to initialize. Ensure the settings specified in BearWare.AudioCodec are valid.

See also
TeamTalkBase.DoJoinChannel()
INTERR_SPEEXDSP_INIT_FAILED 

Same as ClientError.INTERR_AUDIOPREPROCESSOR_INIT_FAILED.

INTERR_AUDIOPREPROCESSOR_INIT_FAILED 

BearWare.AudioPreprocessor failed to initialize.

   This error occurs when joining a channel and the
   #BearWare.AudioPreprocessor is initialized.

   The settings specified by TeamTalkBase.SetSoundInputPreprocessEx()
   are invalid or unsupported. @see TeamTalkBase.DoJoinChannel() 
INTERR_TTMESSAGE_QUEUE_OVERFLOW 

BearWare.TTMessage event queue overflowed.

   The message queue for events has overflowed because
   TeamTalkBase.GetMessage() has not drained the queue in
   time. The #BearWare.TTMessage message queue will suspend
   event handling once the queue overflows and resumes event
   handling again when the message queue has been drained. 
INTERR_SNDEFFECT_FAILURE 

BearWare.SoundDeviceEffects failed to initialize.

   This error occurs when joining a channel and an effect in
   #BearWare.SoundDeviceEffects failed to initialize.

   The effects are applied using TeamTalkBase.SetSoundDeviceEffects() 

Definition at line 3038 of file TeamTalk.cs.

Function Documentation

◆ GetErrorMessage()

static string BearWare.TeamTalkBase.GetErrorMessage ( ClientError  nError)
static

Get textual discription of an error message.

Get a description of an error code posted by either OnCmdError or OnInternalError.

Parameters
nErrorThe number of the error.
Returns
A text description of the error.
See also
OnCmdError
OnInternalError

Definition at line 8117 of file TeamTalk.cs.