예제 #1
0
ProcessParameter::ProcessParameter( const Process& process, const IsoString& paramId )
{
   m_data = new ProcessParameterPrivate( (*API->Process->GetParameterByName)( process.Handle(), paramId.c_str() ) );
   if ( m_data->handle == nullptr )
   {
      if ( paramId.IsEmpty() )
         throw Error( "ProcessParameter: Empty process parameter identifier specified" );
      if ( !paramId.IsValidIdentifier() )
         throw Error( "ProcessParameter: Invalid process parameter identifier specified: \'" + paramId + '\'' );

      throw Error( "ProcessParameter: No parameter was found "
                   "with the specified identifier \'" + paramId + "\' for process \'" + process.Id() + '\'' );
   }
}
예제 #2
0
ProcessParameter::ProcessParameter( const ProcessParameter& table, const IsoString& colId )
{
   m_data = new ProcessParameterPrivate( (*API->Process->GetTableColumnByName)( table.m_data->handle, colId.c_str() ) );
   if ( m_data->handle == nullptr )
   {
      if ( table.IsNull() )
         throw Error( "ProcessParameter: Null table parameter" );
      if ( colId.IsEmpty() )
         throw Error( "ProcessParameter: Empty table column parameter identifier specified" );
      if ( !colId.IsValidIdentifier() )
         throw Error( "ProcessParameter: Invalid table column parameter identifier specified: \'" + colId + '\'' );
      if ( !table.IsTable() )
         throw Error( "ProcessParameter: The specified parameter \'" + table.Id() + "\' is not a table parameter" );

      throw Error( "ProcessParameter: No table column parameter was found "
                   "with the specified identifier \'" + colId + "\' "
                   "for table parameter \'" + table.Id() + "\' "
                   "of process \'" + table.ParentProcess().Id() + '\'' );
   }
}