~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-2.0/column.cc

  • Committer: Brian Aker
  • Date: 2011-11-18 16:11:02 UTC
  • mto: (2463.1.1 drizzle-include)
  • mto: This revision was merged to the branch mainline in revision 2462.
  • Revision ID: brian@tangent.org-20111118161102-d1mbswn88iwc2iv1
Pass through refactoring.

Never throw exceptions from libraries. You can not have the assumption that in a driver that the above language can handle this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
361
361
 
362
362
  if (column == NULL)
363
363
  {
364
 
    column= new (std::nothrow)drizzle_column_st;
 
364
    column= new (std::nothrow) drizzle_column_st;
 
365
 
 
366
    if (column == NULL)
 
367
    {
 
368
      return NULL;
 
369
    }
 
370
 
365
371
    column->result= result;
366
372
    /* SET BELOW: column->next */
367
373
    column->prev= NULL;
683
689
      return DRIZZLE_RETURN_OK;
684
690
    }
685
691
 
686
 
    result->column_buffer= new drizzle_column_st[result->column_count];
 
692
    result->column_buffer= new (std::nothrow) drizzle_column_st[result->column_count];
 
693
 
 
694
    if (result->column_buffer == NULL)
 
695
    {
 
696
      return DRIZZLE_RETURN_MEMORY;
 
697
    }
687
698
  }
688
699
 
689
700
  /* No while body, just keep calling to buffer columns. */